! function(factory) {
    if ('function' === typeof define && define.amd) define(['jquery'], factory);
    else if ('object' === typeof exports) factory(require('jquery'));
    else factory(jQuery)
}(function($, undefined) {
    function timeZoneAbbreviation() {
        var abbreviation, date, formattedStr, i, len, matchedStrings, ref, str;
        if ((formattedStr = (null != (ref = (date = (new Date).toString()).split('(')[1]) ? ref.slice(0, -1) : 0) || date.split(' ')) instanceof Array) {
            matchedStrings = [];
            for (var i = 0, len = formattedStr.length; i < len; i++)
                if ((abbreviation = null !== (ref = (str = formattedStr[i]).match(/\b[A-Z]+\b/))) ? ref[0] : 0) matchedStrings.push(abbreviation);
            formattedStr = matchedStrings.pop()
        }
        return formattedStr
    }

    function UTCDate() { return new Date(Date.UTC.apply(Date, arguments)) }
    if (!('indexOf' in Array.prototype)) Array.prototype.indexOf = function(find, i) {
        if (i === undefined) i = 0;
        if (i < 0) i += this.length;
        if (i < 0) i = 0;
        for (var n = this.length; i < n; i++)
            if (i in this && this[i] === find) return i;
        return -1
    };
    var Datetimepicker = function(element, options) {
        var that = this;
        this.element = $(element);
        this.container = options.container || 'body';
        this.language = options.language || this.element.data('date-language') || 'en';
        this.language = this.language in dates ? this.language : this.language.split('-')[0];
        this.language = this.language in dates ? this.language : 'en';
        this.isRTL = dates[this.language].rtl || !1;
        this.formatType = options.formatType || this.element.data('format-type') || 'standard';
        this.format = DPGlobal.parseFormat(options.format || this.element.data('date-format') || dates[this.language].format || DPGlobal.getDefaultFormat(this.formatType, 'input'), this.formatType);
        this.isInline = !1;
        this.isVisible = !1;
        this.isInput = this.element.is('input');
        this.fontAwesome = options.fontAwesome || this.element.data('font-awesome') || !1;
        this.bootcssVer = options.bootcssVer || (this.isInput ? this.element.is('.form-control') ? 3 : 2 : this.bootcssVer = this.element.is('.input-group') ? 3 : 2);
        this.component = this.element.is('.date') ? 3 === this.bootcssVer ? this.element.find('.input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o').parent() : this.element.find('.add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o').parent() : !1;
        this.componentReset = this.element.is('.date') ? 3 === this.bootcssVer ? this.element.find('.input-group-addon .glyphicon-remove, .input-group-addon .fa-times').parent() : this.element.find('.add-on .icon-remove, .add-on .fa-times').parent() : !1;
        this.hasInput = this.component && this.element.find('input').length;
        if (this.component && 0 === this.component.length) this.component = !1;
        this.linkField = options.linkField || this.element.data('link-field') || !1;
        this.linkFormat = DPGlobal.parseFormat(options.linkFormat || this.element.data('link-format') || DPGlobal.getDefaultFormat(this.formatType, 'link'), this.formatType);
        this.minuteStep = options.minuteStep || this.element.data('minute-step') || 5;
        this.pickerPosition = options.pickerPosition || this.element.data('picker-position') || 'bottom-right';
        this.showMeridian = options.showMeridian || this.element.data('show-meridian') || !1;
        this.initialDate = options.initialDate || new Date;
        this.zIndex = options.zIndex || this.element.data('z-index') || undefined;
        this.title = 'undefined' === typeof options.title ? !1 : options.title;
        this.timezone = options.timezone || timeZoneAbbreviation();
        this.icons = { leftArrow: this.fontAwesome ? 'fa-arrow-left' : 3 === this.bootcssVer ? 'glyphicon-arrow-left' : 'icon-arrow-left', rightArrow: this.fontAwesome ? 'fa-arrow-right' : 3 === this.bootcssVer ? 'glyphicon-arrow-right' : 'icon-arrow-right' };
        this.icontype = this.fontAwesome ? 'fa' : 'glyphicon';
        this._attachEvents();
        this.clickedOutside = function(e) { if (0 === $(e.target).closest('.datetimepicker').length) that.hide() };
        this.formatViewType = 'datetime';
        if ('formatViewType' in options) this.formatViewType = options.formatViewType;
        else if ('formatViewType' in this.element.data()) this.formatViewType = this.element.data('formatViewType');
        this.minView = 0;
        if ('minView' in options) this.minView = options.minView;
        else if ('minView' in this.element.data()) this.minView = this.element.data('min-view');
        this.minView = DPGlobal.convertViewMode(this.minView);
        this.maxView = DPGlobal.modes.length - 1;
        if ('maxView' in options) this.maxView = options.maxView;
        else if ('maxView' in this.element.data()) this.maxView = this.element.data('max-view');
        this.maxView = DPGlobal.convertViewMode(this.maxView);
        this.wheelViewModeNavigation = !1;
        if ('wheelViewModeNavigation' in options) this.wheelViewModeNavigation = options.wheelViewModeNavigation;
        else if ('wheelViewModeNavigation' in this.element.data()) this.wheelViewModeNavigation = this.element.data('view-mode-wheel-navigation');
        this.wheelViewModeNavigationInverseDirection = !1;
        if ('wheelViewModeNavigationInverseDirection' in options) this.wheelViewModeNavigationInverseDirection = options.wheelViewModeNavigationInverseDirection;
        else if ('wheelViewModeNavigationInverseDirection' in this.element.data()) this.wheelViewModeNavigationInverseDirection = this.element.data('view-mode-wheel-navigation-inverse-dir');
        this.wheelViewModeNavigationDelay = 100;
        if ('wheelViewModeNavigationDelay' in options) this.wheelViewModeNavigationDelay = options.wheelViewModeNavigationDelay;
        else if ('wheelViewModeNavigationDelay' in this.element.data()) this.wheelViewModeNavigationDelay = this.element.data('view-mode-wheel-navigation-delay');
        this.startViewMode = 2;
        if ('startView' in options) this.startViewMode = options.startView;
        else if ('startView' in this.element.data()) this.startViewMode = this.element.data('start-view');
        this.startViewMode = DPGlobal.convertViewMode(this.startViewMode);
        this.viewMode = this.startViewMode;
        this.viewSelect = this.minView;
        if ('viewSelect' in options) this.viewSelect = options.viewSelect;
        else if ('viewSelect' in this.element.data()) this.viewSelect = this.element.data('view-select');
        this.viewSelect = DPGlobal.convertViewMode(this.viewSelect);
        this.forceParse = !0;
        if ('forceParse' in options) this.forceParse = options.forceParse;
        else if ('dateForceParse' in this.element.data()) this.forceParse = this.element.data('date-force-parse');
        var template = 3 === this.bootcssVer ? DPGlobal.templateV3 : DPGlobal.template;
        while (-1 !== template.indexOf('{iconType}')) template = template.replace('{iconType}', this.icontype);
        while (-1 !== template.indexOf('{leftArrow}')) template = template.replace('{leftArrow}', this.icons.leftArrow);
        while (-1 !== template.indexOf('{rightArrow}')) template = template.replace('{rightArrow}', this.icons.rightArrow);
        this.picker = $(template).appendTo(this.isInline ? this.element : this.container).on({ click: $.proxy(this.click, this), mousedown: $.proxy(this.mousedown, this) });
        if (this.wheelViewModeNavigation)
            if ($.fn.mousewheel) this.picker.on({ mousewheel: $.proxy(this.mousewheel, this) });
            else console.log('Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option');
        if (this.isInline) this.picker.addClass('datetimepicker-inline');
        else this.picker.addClass('datetimepicker-dropdown-' + this.pickerPosition + ' dropdown-menu');
        if (this.isRTL) {
            this.picker.addClass('datetimepicker-rtl');
            var selector = 3 === this.bootcssVer ? '.prev span, .next span' : '.prev i, .next i';
            this.picker.find(selector).toggleClass(this.icons.leftArrow + ' ' + this.icons.rightArrow)
        }
        $(document).on('mousedown touchend', this.clickedOutside);
        this.autoclose = !1;
        if ('autoclose' in options) this.autoclose = options.autoclose;
        else if ('dateAutoclose' in this.element.data()) this.autoclose = this.element.data('date-autoclose');
        this.keyboardNavigation = !0;
        if ('keyboardNavigation' in options) this.keyboardNavigation = options.keyboardNavigation;
        else if ('dateKeyboardNavigation' in this.element.data()) this.keyboardNavigation = this.element.data('date-keyboard-navigation');
        this.todayBtn = options.todayBtn || this.element.data('date-today-btn') || !1;
        this.clearBtn = options.clearBtn || this.element.data('date-clear-btn') || !1;
        this.todayHighlight = options.todayHighlight || this.element.data('date-today-highlight') || !1;
        this.weekStart = 0;
        if ('undefined' !== typeof options.weekStart) this.weekStart = options.weekStart;
        else if ('undefined' !== typeof this.element.data('date-weekstart')) this.weekStart = this.element.data('date-weekstart');
        else if ('undefined' !== typeof dates[this.language].weekStart) this.weekStart = dates[this.language].weekStart;
        this.weekStart = this.weekStart % 7;
        this.weekEnd = (this.weekStart + 6) % 7;
        this.onRenderDay = function(date) { var render = (options.onRenderDay || function() { return [] })(date); if ('string' === typeof render) render = [render]; return ['day'].concat(render ? render : []) };
        this.onRenderHour = function(date) {
            var render = (options.onRenderHour || function() { return [] })(date),
                res;
            if ('string' === typeof render) render = [render];
            return ['hour'].concat(render ? render : [])
        };
        this.onRenderMinute = function(date) {
            var render = (options.onRenderMinute || function() { return [] })(date),
                res = ['minute'];
            if ('string' === typeof render) render = [render];
            if (date < this.startDate || date > this.endDate) res.push('disabled');
            else if (Math.floor(this.date.getUTCMinutes() / this.minuteStep) === Math.floor(date.getUTCMinutes() / this.minuteStep)) res.push('active');
            return res.concat(render ? render : [])
        };
        this.onRenderYear = function(date) {
            var render = (options.onRenderYear || function() { return [] })(date),
                res = ['year'];
            if ('string' === typeof render) render = [render];
            if (this.date.getUTCFullYear() === date.getUTCFullYear()) res.push('active');
            var currentYear = date.getUTCFullYear(),
                endYear = this.endDate.getUTCFullYear();
            if (date < this.startDate || currentYear > endYear) res.push('disabled');
            return res.concat(render ? render : [])
        };
        this.onRenderMonth = function(date) {
            var render = (options.onRenderMonth || function() { return [] })(date),
                res;
            if ('string' === typeof render) render = [render];
            return ['month'].concat(render ? render : [])
        };
        this.startDate = new Date(-8639968443048e3);
        this.endDate = new Date(8639968443048e3);
        this.datesDisabled = [];
        this.daysOfWeekDisabled = [];
        this.setStartDate(options.startDate || this.element.data('date-startdate'));
        this.setEndDate(options.endDate || this.element.data('date-enddate'));
        this.setDatesDisabled(options.datesDisabled || this.element.data('date-dates-disabled'));
        this.setDaysOfWeekDisabled(options.daysOfWeekDisabled || this.element.data('date-days-of-week-disabled'));
        this.setMinutesDisabled(options.minutesDisabled || this.element.data('date-minute-disabled'));
        this.setHoursDisabled(options.hoursDisabled || this.element.data('date-hour-disabled'));
        this.fillDow();
        this.fillMonths();
        this.update();
        this.showMode();
        if (this.isInline) this.show()
    };
    Datetimepicker.prototype = {
        constructor: Datetimepicker,
        _events: [],
        _attachEvents: function() {
            this._detachEvents();
            if (this.isInput) this._events = [
                [this.element, { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }]
            ];
            else if (this.component && this.hasInput) {
                this._events = [
                    [this.element.find('input'), { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }],
                    [this.component, { click: $.proxy(this.show, this) }]
                ];
                if (this.componentReset) this._events.push([this.componentReset, { click: $.proxy(this.reset, this) }])
            } else if (this.element.is('div')) this.isInline = !0;
            else this._events = [
                [this.element, { click: $.proxy(this.show, this) }]
            ];
            for (var i = 0, el, ev; i < this._events.length; i++) {
                el = this._events[i][0];
                ev = this._events[i][1];
                el.on(ev)
            }
        },
        _detachEvents: function() {
            for (var i = 0, el, ev; i < this._events.length; i++) {
                el = this._events[i][0];
                ev = this._events[i][1];
                el.off(ev)
            }
            this._events = []
        },
        show: function(e) {
            this.picker.show();
            this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
            if (this.forceParse) this.update();
            this.place();
            $(window).on('resize', $.proxy(this.place, this));
            if (e) {
                e.stopPropagation();
                e.preventDefault()
            }
            this.isVisible = !0;
            this.element.trigger({ type: 'show', date: this.date })
        },
        hide: function() {
            if (!this.isVisible) return;
            if (this.isInline) return;
            this.picker.hide();
            $(window).off('resize', this.place);
            this.viewMode = this.startViewMode;
            this.showMode();
            if (!this.isInput) $(document).off('mousedown', this.hide);
            if (this.forceParse && (this.isInput && this.element.val() || this.hasInput && this.element.find('input').val())) this.setValue();
            this.isVisible = !1;
            this.element.trigger({ type: 'hide', date: this.date })
        },
        remove: function() {
            this._detachEvents();
            $(document).off('mousedown', this.clickedOutside);
            this.picker.remove();
            delete this.picker;
            delete this.element.data().datetimepicker
        },
        getDate: function() { var d = this.getUTCDate(); if (null === d) return null; return new Date(d.getTime() + 6e4 * d.getTimezoneOffset()) },
        getUTCDate: function() { return this.date },
        getInitialDate: function() { return this.initialDate },
        setInitialDate: function(initialDate) { this.initialDate = initialDate },
        setDate: function(d) { this.setUTCDate(new Date(d.getTime() - 6e4 * d.getTimezoneOffset())) },
        setUTCDate: function(d) {
            if (d >= this.startDate && d <= this.endDate) {
                this.date = d;
                this.setValue();
                this.viewDate = this.date;
                this.fill()
            } else this.element.trigger({ type: 'outOfRange', date: d, startDate: this.startDate, endDate: this.endDate })
        },
        setFormat: function(format) {
            this.format = DPGlobal.parseFormat(format, this.formatType);
            var element;
            if (this.isInput) element = this.element;
            else if (this.component) element = this.element.find('input');
            if (element && element.val()) this.setValue()
        },
        setValue: function() {
            var formatted = this.getFormattedDate();
            if (!this.isInput) {
                if (this.component) this.element.find('input').val(formatted);
                this.element.data('date', formatted)
            } else this.element.val(formatted);
            if (this.linkField) $('#' + this.linkField).val(this.getFormattedDate(this.linkFormat))
        },
        getFormattedDate: function(format) { format = format || this.format; return DPGlobal.formatDate(this.date, format, this.language, this.formatType, this.timezone) },
        setStartDate: function(startDate) {
            this.startDate = startDate || this.startDate;
            if (8639968443048e3 !== this.startDate.valueOf()) this.startDate = DPGlobal.parseDate(this.startDate, this.format, this.language, this.formatType, this.timezone);
            this.update();
            this.updateNavArrows()
        },
        setEndDate: function(endDate) {
            this.endDate = endDate || this.endDate;
            if (8639968443048e3 !== this.endDate.valueOf()) this.endDate = DPGlobal.parseDate(this.endDate, this.format, this.language, this.formatType, this.timezone);
            this.update();
            this.updateNavArrows()
        },
        setDatesDisabled: function(datesDisabled) {
            this.datesDisabled = datesDisabled || [];
            if (!$.isArray(this.datesDisabled)) this.datesDisabled = this.datesDisabled.split(/,\s*/);
            var mThis = this;
            this.datesDisabled = $.map(this.datesDisabled, function(d) { return DPGlobal.parseDate(d, mThis.format, mThis.language, mThis.formatType, mThis.timezone).toDateString() });
            this.update();
            this.updateNavArrows()
        },
        setTitle: function(selector, value) { return this.picker.find(selector).find('th:eq(1)').text(!1 === this.title ? value : this.title) },
        setDaysOfWeekDisabled: function(daysOfWeekDisabled) {
            this.daysOfWeekDisabled = daysOfWeekDisabled || [];
            if (!$.isArray(this.daysOfWeekDisabled)) this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/);
            this.daysOfWeekDisabled = $.map(this.daysOfWeekDisabled, function(d) { return parseInt(d, 10) });
            this.update();
            this.updateNavArrows()
        },
        setMinutesDisabled: function(minutesDisabled) {
            this.minutesDisabled = minutesDisabled || [];
            if (!$.isArray(this.minutesDisabled)) this.minutesDisabled = this.minutesDisabled.split(/,\s*/);
            this.minutesDisabled = $.map(this.minutesDisabled, function(d) { return parseInt(d, 10) });
            this.update();
            this.updateNavArrows()
        },
        setHoursDisabled: function(hoursDisabled) {
            this.hoursDisabled = hoursDisabled || [];
            if (!$.isArray(this.hoursDisabled)) this.hoursDisabled = this.hoursDisabled.split(/,\s*/);
            this.hoursDisabled = $.map(this.hoursDisabled, function(d) { return parseInt(d, 10) });
            this.update();
            this.updateNavArrows()
        },
        place: function() {
            if (this.isInline) return;
            if (!this.zIndex) {
                var index_highest = 0;
                $('div').each(function() { var index_current = parseInt($(this).css('zIndex'), 10); if (index_current > index_highest) index_highest = index_current });
                this.zIndex = index_highest + 10
            }
            var offset, top, left, containerOffset;
            if (this.container instanceof $) containerOffset = this.container.offset();
            else containerOffset = $(this.container).offset();
            if (this.component) { left = (offset = this.component.offset()).left; if ('bottom-left' === this.pickerPosition || 'top-left' === this.pickerPosition) left += this.component.outerWidth() - this.picker.outerWidth() } else { left = (offset = this.element.offset()).left; if ('bottom-left' === this.pickerPosition || 'top-left' === this.pickerPosition) left += this.element.outerWidth() - this.picker.outerWidth() }
            var bodyWidth = document.body.clientWidth || window.innerWidth;
            if (left + 220 > bodyWidth) left = bodyWidth - 220;
            if ('top-left' === this.pickerPosition || 'top-right' === this.pickerPosition) top = offset.top - this.picker.outerHeight();
            else top = offset.top + this.height;
            top -= containerOffset.top;
            left -= containerOffset.left;
            this.picker.css({ top: top, left: left, zIndex: this.zIndex })
        },
        hour_minute: "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",
        update: function(argument_0) {
            var date, fromArgs = !1;
            if (arguments && arguments.length && ('string' === typeof argument_0 || argument_0 instanceof Date)) {
                date = argument_0;
                fromArgs = !0
            } else if ('string' === typeof(date = (this.isInput ? this.element.val() : this.element.find('input').val()) || this.element.data('date') || this.initialDate)) date = date.replace(/^\s+|\s+$/g, '');
            if (!date) {
                date = new Date;
                fromArgs = !1
            }
            if ("string" === typeof date)
                if (new RegExp(this.hour_minute).test(date) || new RegExp(this.hour_minute + ":[0-5][0-9]").test(date)) date = this.getDate();
            this.date = DPGlobal.parseDate(date, this.format, this.language, this.formatType, this.timezone);
            if (fromArgs) this.setValue();
            if (this.date < this.startDate) this.viewDate = new Date(this.startDate);
            else if (this.date > this.endDate) this.viewDate = new Date(this.endDate);
            else this.viewDate = new Date(this.date);
            this.fill()
        },
        fillDow: function() {
            var dowCnt = this.weekStart,
                html = '<tr>';
            while (dowCnt < this.weekStart + 7) html += '<th class="dow">' + dates[this.language].daysMin[dowCnt++ % 7] + '</th>';
            html += '</tr>';
            this.picker.find('.datetimepicker-days thead').append(html)
        },
        fillMonths: function() {
            for (var html = '', d = new Date(this.viewDate), i = 0; i < 12; i++) {
                d.setUTCMonth(i);
                html += '<span class="' + this.onRenderMonth(d).join(' ') + '">' + dates[this.language].monthsShort[i] + '</span>'
            }
            this.picker.find('.datetimepicker-months td').html(html)
        },
        fill: function() {
            if (!this.date || !this.viewDate) return;
            var d = new Date(this.viewDate),
                year = d.getUTCFullYear(),
                month = d.getUTCMonth(),
                dayMonth = d.getUTCDate(),
                hours = d.getUTCHours(),
                startYear = this.startDate.getUTCFullYear(),
                startMonth = this.startDate.getUTCMonth(),
                endYear = this.endDate.getUTCFullYear(),
                endMonth = this.endDate.getUTCMonth() + 1,
                currentDate = new UTCDate(this.date.getUTCFullYear(), this.date.getUTCMonth(), this.date.getUTCDate()).valueOf(),
                today = new Date;
            this.setTitle('.datetimepicker-days', dates[this.language].months[month] + ' ' + year);
            if ('time' === this.formatViewType) {
                var formatted = this.getFormattedDate();
                this.setTitle('.datetimepicker-hours', formatted);
                this.setTitle('.datetimepicker-minutes', formatted)
            } else {
                this.setTitle('.datetimepicker-hours', dayMonth + ' ' + dates[this.language].months[month] + ' ' + year);
                this.setTitle('.datetimepicker-minutes', dayMonth + ' ' + dates[this.language].months[month] + ' ' + year)
            }
            this.picker.find('tfoot th.today').text(dates[this.language].today || dates['en'].today).toggle(!1 !== this.todayBtn);
            this.picker.find('tfoot th.clear').text(dates[this.language].clear || dates['en'].clear).toggle(!1 !== this.clearBtn);
            this.updateNavArrows();
            this.fillMonths();
            var prevMonth = UTCDate(year, month - 1, 28, 0, 0, 0, 0),
                day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
            prevMonth.setUTCDate(day);
            prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7) % 7);
            var nextMonth = new Date(prevMonth);
            nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
            nextMonth = nextMonth.valueOf();
            var html = [],
                classes;
            while (prevMonth.valueOf() < nextMonth) {
                if (prevMonth.getUTCDay() === this.weekStart) html.push('<tr>');
                classes = this.onRenderDay(prevMonth);
                if (prevMonth.getUTCFullYear() < year || prevMonth.getUTCFullYear() === year && prevMonth.getUTCMonth() < month) classes.push('old');
                else if (prevMonth.getUTCFullYear() > year || prevMonth.getUTCFullYear() === year && prevMonth.getUTCMonth() > month) classes.push('new');
                if (this.todayHighlight && prevMonth.getUTCFullYear() === today.getFullYear() && prevMonth.getUTCMonth() === today.getMonth() && prevMonth.getUTCDate() === today.getDate()) classes.push('today');
                if (prevMonth.valueOf() === currentDate) classes.push('active');
                if (prevMonth.valueOf() + 864e5 <= this.startDate || prevMonth.valueOf() > this.endDate || -1 !== $.inArray(prevMonth.getUTCDay(), this.daysOfWeekDisabled) || -1 !== $.inArray(prevMonth.toDateString(), this.datesDisabled)) classes.push('disabled');
                html.push('<td class="' + classes.join(' ') + '">' + prevMonth.getUTCDate() + '</td>');
                if (prevMonth.getUTCDay() === this.weekEnd) html.push('</tr>');
                prevMonth.setUTCDate(prevMonth.getUTCDate() + 1)
            }
            this.picker.find('.datetimepicker-days tbody').empty().append(html.join(''));
            html = [];
            var txt = '',
                meridian = '',
                meridianOld = '',
                hoursDisabled = this.hoursDisabled || [];
            d = new Date(this.viewDate);
            for (var i = 0; i < 24; i++) {
                d.setUTCHours(i);
                classes = this.onRenderHour(d);
                if (-1 !== hoursDisabled.indexOf(i)) classes.push('disabled');
                var actual = UTCDate(year, month, dayMonth, i);
                if (actual.valueOf() + 36e5 <= this.startDate || actual.valueOf() > this.endDate) classes.push('disabled');
                else if (hours === i) classes.push('active');
                if (this.showMeridian && 2 === dates[this.language].meridiem.length) {
                    if ((meridian = i < 12 ? dates[this.language].meridiem[0] : dates[this.language].meridiem[1]) !== meridianOld) {
                        if ('' !== meridianOld) html.push('</fieldset>');
                        html.push('<fieldset class="hour"><legend>' + meridian.toUpperCase() + '</legend>')
                    }
                    meridianOld = meridian;
                    txt = i % 12 ? i % 12 : 12;
                    if (i < 12) classes.push('hour_am');
                    else classes.push('hour_pm');
                    html.push('<span class="' + classes.join(' ') + '">' + txt + '</span>');
                    if (23 === i) html.push('</fieldset>')
                } else {
                    txt = i + ':00';
                    html.push('<span class="' + classes.join(' ') + '">' + txt + '</span>')
                }
            }
            this.picker.find('.datetimepicker-hours td').html(html.join(''));
            html = [];
            meridianOld = meridian = txt = '';
            var minutesDisabled = this.minutesDisabled || [];
            d = new Date(this.viewDate);
            for (var i = 0; i < 60; i += this.minuteStep) {
                if (-1 !== minutesDisabled.indexOf(i)) continue;
                d.setUTCMinutes(i);
                d.setUTCSeconds(0);
                classes = this.onRenderMinute(d);
                if (this.showMeridian && 2 === dates[this.language].meridiem.length) {
                    if ((meridian = hours < 12 ? dates[this.language].meridiem[0] : dates[this.language].meridiem[1]) !== meridianOld) {
                        if ('' !== meridianOld) html.push('</fieldset>');
                        html.push('<fieldset class="minute"><legend>' + meridian.toUpperCase() + '</legend>')
                    }
                    meridianOld = meridian;
                    txt = hours % 12 ? hours % 12 : 12;
                    html.push('<span class="' + classes.join(' ') + '">' + txt + ':' + (i < 10 ? '0' + i : i) + '</span>');
                    if (59 === i) html.push('</fieldset>')
                } else {
                    txt = i + ':00';
                    html.push('<span class="' + classes.join(' ') + '">' + hours + ':' + (i < 10 ? '0' + i : i) + '</span>')
                }
            }
            this.picker.find('.datetimepicker-minutes td').html(html.join(''));
            var currentYear = this.date.getUTCFullYear(),
                months = this.setTitle('.datetimepicker-months', year).end().find('.month').removeClass('active');
            if (currentYear === year) months.eq(this.date.getUTCMonth()).addClass('active');
            if (year < startYear || year > endYear) months.addClass('disabled');
            if (year === startYear) months.slice(0, startMonth).addClass('disabled');
            if (year === endYear) months.slice(endMonth).addClass('disabled');
            html = '';
            year = 10 * parseInt(year / 10, 10);
            var yearCont = this.setTitle('.datetimepicker-years', year + '-' + (year + 9)).end().find('td');
            year -= 1;
            d = new Date(this.viewDate);
            for (var i = -1; i < 11; i++) {
                d.setUTCFullYear(year);
                classes = this.onRenderYear(d);
                if (-1 === i || 10 === i) classes.push(old);
                html += '<span class="' + classes.join(' ') + '">' + year + '</span>';
                year += 1
            }
            yearCont.html(html);
            this.place()
        },
        updateNavArrows: function() {
            var d = new Date(this.viewDate),
                year = d.getUTCFullYear(),
                month = d.getUTCMonth(),
                day = d.getUTCDate(),
                hour = d.getUTCHours();
            switch (this.viewMode) {
                case 0:
                    if (year <= this.startDate.getUTCFullYear() && month <= this.startDate.getUTCMonth() && day <= this.startDate.getUTCDate() && hour <= this.startDate.getUTCHours()) this.picker.find('.prev').css({ visibility: 'hidden' });
                    else this.picker.find('.prev').css({ visibility: 'visible' });
                    if (year >= this.endDate.getUTCFullYear() && month >= this.endDate.getUTCMonth() && day >= this.endDate.getUTCDate() && hour >= this.endDate.getUTCHours()) this.picker.find('.next').css({ visibility: 'hidden' });
                    else this.picker.find('.next').css({ visibility: 'visible' });
                    break;
                case 1:
                    if (year <= this.startDate.getUTCFullYear() && month <= this.startDate.getUTCMonth() && day <= this.startDate.getUTCDate()) this.picker.find('.prev').css({ visibility: 'hidden' });
                    else this.picker.find('.prev').css({ visibility: 'visible' });
                    if (year >= this.endDate.getUTCFullYear() && month >= this.endDate.getUTCMonth() && day >= this.endDate.getUTCDate()) this.picker.find('.next').css({ visibility: 'hidden' });
                    else this.picker.find('.next').css({ visibility: 'visible' });
                    break;
                case 2:
                    if (year <= this.startDate.getUTCFullYear() && month <= this.startDate.getUTCMonth()) this.picker.find('.prev').css({ visibility: 'hidden' });
                    else this.picker.find('.prev').css({ visibility: 'visible' });
                    if (year >= this.endDate.getUTCFullYear() && month >= this.endDate.getUTCMonth()) this.picker.find('.next').css({ visibility: 'hidden' });
                    else this.picker.find('.next').css({ visibility: 'visible' });
                    break;
                case 3:
                case 4:
                    if (year <= this.startDate.getUTCFullYear()) this.picker.find('.prev').css({ visibility: 'hidden' });
                    else this.picker.find('.prev').css({ visibility: 'visible' });
                    if (year >= this.endDate.getUTCFullYear()) this.picker.find('.next').css({ visibility: 'hidden' });
                    else this.picker.find('.next').css({ visibility: 'visible' });
                    break
            }
        },
        mousewheel: function(e) {
            e.preventDefault();
            e.stopPropagation();
            if (this.wheelPause) return;
            this.wheelPause = !0;
            var delta = e.originalEvent.wheelDelta,
                mode = delta > 0 ? 1 : 0 === delta ? 0 : -1;
            if (this.wheelViewModeNavigationInverseDirection) mode = -mode;
            this.showMode(mode);
            setTimeout($.proxy(function() { this.wheelPause = !1 }, this), this.wheelViewModeNavigationDelay)
        },
        click: function(e) {
            e.stopPropagation();
            e.preventDefault();
            var target = $(e.target).closest('span, td, th, legend');
            if (target.is('.' + this.icontype)) target = $(target).parent().closest('span, td, th, legend');
            if (1 === target.length) {
                if (target.is('.disabled')) { this.element.trigger({ type: 'outOfRange', date: this.viewDate, startDate: this.startDate, endDate: this.endDate }); return }
                switch (target[0].nodeName.toLowerCase()) {
                    case 'th':
                        switch (target[0].className) {
                            case 'switch':
                                this.showMode(1);
                                break;
                            case 'prev':
                            case 'next':
                                var dir = DPGlobal.modes[this.viewMode].navStep * ('prev' === target[0].className ? -1 : 1);
                                switch (this.viewMode) {
                                    case 0:
                                        this.viewDate = this.moveHour(this.viewDate, dir);
                                        break;
                                    case 1:
                                        this.viewDate = this.moveDate(this.viewDate, dir);
                                        break;
                                    case 2:
                                        this.viewDate = this.moveMonth(this.viewDate, dir);
                                        break;
                                    case 3:
                                    case 4:
                                        this.viewDate = this.moveYear(this.viewDate, dir);
                                        break
                                }
                                this.fill();
                                this.element.trigger({ type: target[0].className + ':' + this.convertViewModeText(this.viewMode), date: this.viewDate, startDate: this.startDate, endDate: this.endDate });
                                break;
                            case 'clear':
                                this.reset();
                                if (this.autoclose) this.hide();
                                break;
                            case 'today':
                                var date = new Date;
                                if ((date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0)) < this.startDate) date = this.startDate;
                                else if (date > this.endDate) date = this.endDate;
                                this.viewMode = this.startViewMode;
                                this.showMode(0);
                                this._setDate(date);
                                this.fill();
                                if (this.autoclose) this.hide();
                                break
                        }
                        break;
                    case 'span':
                        if (!target.is('.disabled')) {
                            var year = this.viewDate.getUTCFullYear(),
                                month = this.viewDate.getUTCMonth(),
                                day = this.viewDate.getUTCDate(),
                                hours = this.viewDate.getUTCHours(),
                                minutes = this.viewDate.getUTCMinutes(),
                                seconds = this.viewDate.getUTCSeconds();
                            if (target.is('.month')) {
                                this.viewDate.setUTCDate(1);
                                month = target.parent().find('span').index(target);
                                day = this.viewDate.getUTCDate();
                                this.viewDate.setUTCMonth(month);
                                this.element.trigger({ type: 'changeMonth', date: this.viewDate });
                                if (this.viewSelect >= 3) this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0))
                            } else if (target.is('.year')) {
                                this.viewDate.setUTCDate(1);
                                year = parseInt(target.text(), 10) || 0;
                                this.viewDate.setUTCFullYear(year);
                                this.element.trigger({ type: 'changeYear', date: this.viewDate });
                                if (this.viewSelect >= 4) this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0))
                            } else if (target.is('.hour')) {
                                hours = parseInt(target.text(), 10) || 0;
                                if (target.hasClass('hour_am') || target.hasClass('hour_pm'))
                                    if (12 === hours && target.hasClass('hour_am')) hours = 0;
                                    else if (12 !== hours && target.hasClass('hour_pm')) hours += 12;
                                this.viewDate.setUTCHours(hours);
                                this.element.trigger({ type: 'changeHour', date: this.viewDate });
                                if (this.viewSelect >= 1) this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0))
                            } else if (target.is('.minute')) {
                                minutes = parseInt(target.text().substr(target.text().indexOf(':') + 1), 10) || 0;
                                this.viewDate.setUTCMinutes(minutes);
                                this.element.trigger({ type: 'changeMinute', date: this.viewDate });
                                if (this.viewSelect >= 0) this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0))
                            }
                            if (0 !== this.viewMode) {
                                var oldViewMode = this.viewMode;
                                this.showMode(-1);
                                this.fill();
                                if (oldViewMode === this.viewMode && this.autoclose) this.hide()
                            } else { this.fill(); if (this.autoclose) this.hide() }
                        }
                        break;
                    case 'td':
                        if (target.is('.day') && !target.is('.disabled')) {
                            var day = parseInt(target.text(), 10) || 1,
                                year = this.viewDate.getUTCFullYear(),
                                month = this.viewDate.getUTCMonth(),
                                hours = this.viewDate.getUTCHours(),
                                minutes = this.viewDate.getUTCMinutes(),
                                seconds = this.viewDate.getUTCSeconds();
                            if (target.is('.old'))
                                if (0 === month) {
                                    month = 11;
                                    year -= 1
                                } else month -= 1;
                            else if (target.is('.new'))
                                if (11 === month) {
                                    month = 0;
                                    year += 1
                                } else month += 1;
                            this.viewDate.setUTCFullYear(year);
                            this.viewDate.setUTCMonth(month, day);
                            this.element.trigger({ type: 'changeDay', date: this.viewDate });
                            if (this.viewSelect >= 2) this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0))
                        }
                        var oldViewMode = this.viewMode;
                        this.showMode(-1);
                        this.fill();
                        if (oldViewMode === this.viewMode && this.autoclose) this.hide();
                        break
                }
            }
        },
        _setDate: function(date, which) {
            if (!which || 'date' === which) this.date = date;
            if (!which || 'view' === which) this.viewDate = date;
            this.fill();
            this.setValue();
            var element;
            if (this.isInput) element = this.element;
            else if (this.component) element = this.element.find('input');
            if (element) element.change();
            this.element.trigger({ type: 'changeDate', date: this.getDate() });
            if (null === date) this.date = this.viewDate
        },
        moveMinute: function(date, dir) {
            if (!dir) return date;
            var new_date = new Date(date.valueOf());
            new_date.setUTCMinutes(new_date.getUTCMinutes() + dir * this.minuteStep);
            return new_date
        },
        moveHour: function(date, dir) {
            if (!dir) return date;
            var new_date = new Date(date.valueOf());
            new_date.setUTCHours(new_date.getUTCHours() + dir);
            return new_date
        },
        moveDate: function(date, dir) {
            if (!dir) return date;
            var new_date = new Date(date.valueOf());
            new_date.setUTCDate(new_date.getUTCDate() + dir);
            return new_date
        },
        moveMonth: function(date, dir) {
            if (!dir) return date;
            var new_date = new Date(date.valueOf()),
                day = new_date.getUTCDate(),
                month = new_date.getUTCMonth(),
                mag = Math.abs(dir),
                new_month, test;
            dir = dir > 0 ? 1 : -1;
            if (1 === mag) {
                test = -1 === dir ? function() { return new_date.getUTCMonth() === month } : function() { return new_date.getUTCMonth() !== new_month };
                new_month = month + dir;
                new_date.setUTCMonth(new_month);
                if (new_month < 0 || new_month > 11) new_month = (new_month + 12) % 12
            } else {
                for (var i = 0; i < mag; i++) new_date = this.moveMonth(new_date, dir);
                new_month = new_date.getUTCMonth();
                new_date.setUTCDate(day);
                test = function() { return new_month !== new_date.getUTCMonth() }
            }
            while (test()) {
                new_date.setUTCDate(--day);
                new_date.setUTCMonth(new_month)
            }
            return new_date
        },
        moveYear: function(date, dir) { return this.moveMonth(date, 12 * dir) },
        dateWithinRange: function(date) { return date >= this.startDate && date <= this.endDate },
        keydown: function(e) {
            if (this.picker.is(':not(:visible)')) { if (27 === e.keyCode) this.show(); return }
            var dateChanged = !1,
                dir, newDate, newViewDate;
            switch (e.keyCode) {
                case 27:
                    this.hide();
                    e.preventDefault();
                    break;
                case 37:
                case 39:
                    if (!this.keyboardNavigation) break;
                    dir = 37 === e.keyCode ? -1 : 1;
                    var viewMode = this.viewMode;
                    if (e.ctrlKey) viewMode += 2;
                    else if (e.shiftKey) viewMode += 1;
                    if (4 === viewMode) {
                        newDate = this.moveYear(this.date, dir);
                        newViewDate = this.moveYear(this.viewDate, dir)
                    } else if (3 === viewMode) {
                        newDate = this.moveMonth(this.date, dir);
                        newViewDate = this.moveMonth(this.viewDate, dir)
                    } else if (2 === viewMode) {
                        newDate = this.moveDate(this.date, dir);
                        newViewDate = this.moveDate(this.viewDate, dir)
                    } else if (1 === viewMode) {
                        newDate = this.moveHour(this.date, dir);
                        newViewDate = this.moveHour(this.viewDate, dir)
                    } else if (0 === viewMode) {
                        newDate = this.moveMinute(this.date, dir);
                        newViewDate = this.moveMinute(this.viewDate, dir)
                    }
                    if (this.dateWithinRange(newDate)) {
                        this.date = newDate;
                        this.viewDate = newViewDate;
                        this.setValue();
                        this.update();
                        e.preventDefault();
                        dateChanged = !0
                    }
                    break;
                case 38:
                case 40:
                    if (!this.keyboardNavigation) break;
                    dir = 38 === e.keyCode ? -1 : 1;
                    viewMode = this.viewMode;
                    if (e.ctrlKey) viewMode += 2;
                    else if (e.shiftKey) viewMode += 1;
                    if (4 === viewMode) {
                        newDate = this.moveYear(this.date, dir);
                        newViewDate = this.moveYear(this.viewDate, dir)
                    } else if (3 === viewMode) {
                        newDate = this.moveMonth(this.date, dir);
                        newViewDate = this.moveMonth(this.viewDate, dir)
                    } else if (2 === viewMode) {
                        newDate = this.moveDate(this.date, 7 * dir);
                        newViewDate = this.moveDate(this.viewDate, 7 * dir)
                    } else if (1 === viewMode)
                        if (this.showMeridian) {
                            newDate = this.moveHour(this.date, 6 * dir);
                            newViewDate = this.moveHour(this.viewDate, 6 * dir)
                        } else {
                            newDate = this.moveHour(this.date, 4 * dir);
                            newViewDate = this.moveHour(this.viewDate, 4 * dir)
                        }
                    else if (0 === viewMode) {
                        newDate = this.moveMinute(this.date, 4 * dir);
                        newViewDate = this.moveMinute(this.viewDate, 4 * dir)
                    }
                    if (this.dateWithinRange(newDate)) {
                        this.date = newDate;
                        this.viewDate = newViewDate;
                        this.setValue();
                        this.update();
                        e.preventDefault();
                        dateChanged = !0
                    }
                    break;
                case 13:
                    if (0 !== this.viewMode) {
                        var oldViewMode = this.viewMode;
                        this.showMode(-1);
                        this.fill();
                        if (oldViewMode === this.viewMode && this.autoclose) this.hide()
                    } else { this.fill(); if (this.autoclose) this.hide() }
                    e.preventDefault();
                    break;
                case 9:
                    this.hide();
                    break
            }
            if (dateChanged) {
                var element;
                if (this.isInput) element = this.element;
                else if (this.component) element = this.element.find('input');
                if (element) element.change();
                this.element.trigger({ type: 'changeDate', date: this.getDate() })
            }
        },
        showMode: function(dir) {
            if (dir) {
                var newViewMode = Math.max(0, Math.min(DPGlobal.modes.length - 1, this.viewMode + dir));
                if (newViewMode >= this.minView && newViewMode <= this.maxView) {
                    this.element.trigger({ type: 'changeMode', date: this.viewDate, oldViewMode: this.viewMode, newViewMode: newViewMode });
                    this.viewMode = newViewMode
                }
            }
            this.picker.find('>div').hide().filter('.datetimepicker-' + DPGlobal.modes[this.viewMode].clsName).css('display', 'block');
            this.updateNavArrows()
        },
        reset: function() { this._setDate(null, 'date') },
        convertViewModeText: function(viewMode) {
            switch (viewMode) {
                case 4:
                    return 'decade';
                case 3:
                    return 'year';
                case 2:
                    return 'month';
                case 1:
                    return 'day';
                case 0:
                    return 'hour'
            }
        }
    };
    var old = $.fn.datetimepicker;
    $.fn.datetimepicker = function(option) {
        var args = Array.apply(null, arguments),
            internal_return;
        args.shift();
        this.each(function() {
            var $this = $(this),
                data = $this.data('datetimepicker'),
                options = 'object' === typeof option && option;
            if (!data) $this.data('datetimepicker', data = new Datetimepicker(this, $.extend({}, $.fn.datetimepicker.defaults, options)));
            if ('string' === typeof option && 'function' === typeof data[option])
                if ((internal_return = data[option].apply(data, args)) !== undefined) return !1
        });
        if (internal_return !== undefined) return internal_return;
        else return this
    };
    $.fn.datetimepicker.defaults = {};
    $.fn.datetimepicker.Constructor = Datetimepicker;
    var dates = $.fn.datetimepicker.dates = { en: { days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'], months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], meridiem: ['am', 'pm'], suffix: ['st', 'nd', 'rd', 'th'], today: 'Today', clear: 'Clear' } },
        DPGlobal = {
            modes: [{ clsName: 'minutes', navFnc: 'Hours', navStep: 1 }, { clsName: 'hours', navFnc: 'Date', navStep: 1 }, { clsName: 'days', navFnc: 'Month', navStep: 1 }, { clsName: 'months', navFnc: 'FullYear', navStep: 1 }, { clsName: 'years', navFnc: 'FullYear', navStep: 10 }],
            isLeapYear: function(year) { return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0 },
            getDaysInMonth: function(year, month) { return [31, DPGlobal.isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] },
            getDefaultFormat: function(type, field) {
                if ('standard' === type)
                    if ('input' === field) return 'yyyy-mm-dd hh:ii';
                    else return 'yyyy-mm-dd hh:ii:ss';
                else if ('php' === type)
                    if ('input' === field) return 'Y-m-d H:i';
                    else return 'Y-m-d H:i:s';
                else throw new Error('Invalid format type.')
            },
            validParts: function(type) {
                if ('standard' === type) return /t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
                else if ('php' === type) return /[dDjlNwzFmMnStyYaABgGhHis]/g;
                else throw new Error('Invalid format type.')
            },
            nonpunctuation: /[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,
            parseFormat: function(format, type) {
                var separators = format.replace(this.validParts(type), '\0').split('\0'),
                    parts = format.match(this.validParts(type));
                if (!separators || !separators.length || !parts || 0 === parts.length) throw new Error('Invalid date format.');
                return { separators: separators, parts: parts }
            },
            parseDate: function(date, format, language, type, timezone) {
                if (date instanceof Date) {
                    var dateUTC = new Date(date.valueOf() - 6e4 * date.getTimezoneOffset());
                    dateUTC.setMilliseconds(0);
                    return dateUTC
                }
                if (/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(date)) format = this.parseFormat('yyyy-mm-dd', type);
                if (/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(date)) format = this.parseFormat('yyyy-mm-dd hh:ii', type);
                if (/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(date)) format = this.parseFormat('yyyy-mm-dd hh:ii:ss', type);
                if (/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(date)) {
                    var part_re = /([-+]\d+)([dmwy])/,
                        parts = date.match(/([-+]\d+)([dmwy])/g),
                        part, dir;
                    date = new Date;
                    for (var i = 0; i < parts.length; i++) {
                        part = part_re.exec(parts[i]);
                        dir = parseInt(part[1]);
                        switch (part[2]) {
                            case 'd':
                                date.setUTCDate(date.getUTCDate() + dir);
                                break;
                            case 'm':
                                date = Datetimepicker.prototype.moveMonth.call(Datetimepicker.prototype, date, dir);
                                break;
                            case 'w':
                                date.setUTCDate(date.getUTCDate() + 7 * dir);
                                break;
                            case 'y':
                                date = Datetimepicker.prototype.moveYear.call(Datetimepicker.prototype, date, dir);
                                break
                        }
                    }
                    return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), 0)
                }
                var parts = date && date.toString().match(this.nonpunctuation) || [],
                    date = new Date(0, 0, 0, 0, 0, 0, 0),
                    parsed = {},
                    setters_order = ['hh', 'h', 'ii', 'i', 'ss', 's', 'yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'D', 'DD', 'd', 'dd', 'H', 'HH', 'p', 'P', 'z', 'Z'],
                    setters_map = {
                        hh: function(d, v) { return d.setUTCHours(v) },
                        h: function(d, v) { return d.setUTCHours(v) },
                        HH: function(d, v) { return d.setUTCHours(12 === v ? 0 : v) },
                        H: function(d, v) { return d.setUTCHours(12 === v ? 0 : v) },
                        ii: function(d, v) { return d.setUTCMinutes(v) },
                        i: function(d, v) { return d.setUTCMinutes(v) },
                        ss: function(d, v) { return d.setUTCSeconds(v) },
                        s: function(d, v) { return d.setUTCSeconds(v) },
                        yyyy: function(d, v) { return d.setUTCFullYear(v) },
                        yy: function(d, v) { return d.setUTCFullYear(2e3 + v) },
                        m: function(d, v) {
                            v -= 1;
                            while (v < 0) v += 12;
                            v %= 12;
                            d.setUTCMonth(v);
                            while (d.getUTCMonth() !== v)
                                if (isNaN(d.getUTCMonth())) return d;
                                else d.setUTCDate(d.getUTCDate() - 1);
                            return d
                        },
                        d: function(d, v) { return d.setUTCDate(v) },
                        p: function(d, v) { return d.setUTCHours(1 === v ? d.getUTCHours() + 12 : d.getUTCHours()) },
                        z: function() { return timezone }
                    },
                    val, filtered, part;
                setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
                setters_map['dd'] = setters_map['d'];
                setters_map['P'] = setters_map['p'];
                setters_map['Z'] = setters_map['z'];
                date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());
                if (parts.length === format.parts.length) {
                    for (var i = 0, cnt = format.parts.length; i < cnt; i++) {
                        val = parseInt(parts[i], 10);
                        part = format.parts[i];
                        if (isNaN(val)) switch (part) {
                            case 'MM':
                                filtered = $(dates[language].months).filter(function() { var m = this.slice(0, parts[i].length); return m === parts[i].slice(0, m.length) });
                                val = $.inArray(filtered[0], dates[language].months) + 1;
                                break;
                            case 'M':
                                filtered = $(dates[language].monthsShort).filter(function() {
                                    var m = this.slice(0, parts[i].length),
                                        p = parts[i].slice(0, m.length);
                                    return m.toLowerCase() === p.toLowerCase()
                                });
                                val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
                                break;
                            case 'p':
                            case 'P':
                                val = $.inArray(parts[i].toLowerCase(), dates[language].meridiem);
                                break;
                            case 'z':
                            case 'Z':
                                timezone;
                                break
                        }
                        parsed[part] = val
                    }
                    for (var i = 0, s; i < setters_order.length; i++)
                        if ((s = setters_order[i]) in parsed && !isNaN(parsed[s])) setters_map[s](date, parsed[s])
                }
                return date
            },
            formatDate: function(date, format, language, type, timezone) {
                if (null === date) return '';
                var val;
                if ('standard' === type) {
                    val = { t: date.getTime(), yy: date.getUTCFullYear().toString().substring(2), yyyy: date.getUTCFullYear(), m: date.getUTCMonth() + 1, M: dates[language].monthsShort[date.getUTCMonth()], MM: dates[language].months[date.getUTCMonth()], d: date.getUTCDate(), D: dates[language].daysShort[date.getUTCDay()], DD: dates[language].days[date.getUTCDay()], p: 2 === dates[language].meridiem.length ? dates[language].meridiem[date.getUTCHours() < 12 ? 0 : 1] : '', h: date.getUTCHours(), i: date.getUTCMinutes(), s: date.getUTCSeconds(), z: timezone };
                    if (2 === dates[language].meridiem.length) val.H = val.h % 12 === 0 ? 12 : val.h % 12;
                    else val.H = val.h;
                    val.HH = (val.H < 10 ? '0' : '') + val.H;
                    val.P = val.p.toUpperCase();
                    val.Z = val.z;
                    val.hh = (val.h < 10 ? '0' : '') + val.h;
                    val.ii = (val.i < 10 ? '0' : '') + val.i;
                    val.ss = (val.s < 10 ? '0' : '') + val.s;
                    val.dd = (val.d < 10 ? '0' : '') + val.d;
                    val.mm = (val.m < 10 ? '0' : '') + val.m
                } else if ('php' === type) {
                    (val = { y: date.getUTCFullYear().toString().substring(2), Y: date.getUTCFullYear(), F: dates[language].months[date.getUTCMonth()], M: dates[language].monthsShort[date.getUTCMonth()], n: date.getUTCMonth() + 1, t: DPGlobal.getDaysInMonth(date.getUTCFullYear(), date.getUTCMonth()), j: date.getUTCDate(), l: dates[language].days[date.getUTCDay()], D: dates[language].daysShort[date.getUTCDay()], w: date.getUTCDay(), N: 0 === date.getUTCDay() ? 7 : date.getUTCDay(), S: date.getUTCDate() % 10 <= dates[language].suffix.length ? dates[language].suffix[date.getUTCDate() % 10 - 1] : '', a: 2 === dates[language].meridiem.length ? dates[language].meridiem[date.getUTCHours() < 12 ? 0 : 1] : '', g: date.getUTCHours() % 12 === 0 ? 12 : date.getUTCHours() % 12, G: date.getUTCHours(), i: date.getUTCMinutes(), s: date.getUTCSeconds() }).m = (val.n < 10 ? '0' : '') + val.n;
                    val.d = (val.j < 10 ? '0' : '') + val.j;
                    val.A = val.a.toString().toUpperCase();
                    val.h = (val.g < 10 ? '0' : '') + val.g;
                    val.H = (val.G < 10 ? '0' : '') + val.G;
                    val.i = (val.i < 10 ? '0' : '') + val.i;
                    val.s = (val.s < 10 ? '0' : '') + val.s
                } else throw new Error('Invalid format type.');
                for (var date = [], seps = $.extend([], format.separators), i = 0, cnt = format.parts.length; i < cnt; i++) {
                    if (seps.length) date.push(seps.shift());
                    date.push(val[format.parts[i]])
                }
                if (seps.length) date.push(seps.shift());
                return date.join('')
            },
            convertViewMode: function(viewMode) {
                switch (viewMode) {
                    case 4:
                    case 'decade':
                        viewMode = 4;
                        break;
                    case 3:
                    case 'year':
                        viewMode = 3;
                        break;
                    case 2:
                    case 'month':
                        viewMode = 2;
                        break;
                    case 1:
                    case 'day':
                        viewMode = 1;
                        break;
                    case 0:
                    case 'hour':
                        viewMode = 0;
                        break
                }
                return viewMode
            },
            headTemplate: '<thead>' + '<tr>' + '<th class="prev"><i class="{iconType} {leftArrow}"/></th>' + '<th colspan="5" class="switch"></th>' + '<th class="next"><i class="{iconType} {rightArrow}"/></th>' + '</tr>' + '</thead>',
            headTemplateV3: '<thead>' + '<tr>' + '<th class="prev"><span class="{iconType} {leftArrow}"></span> </th>' + '<th colspan="5" class="switch"></th>' + '<th class="next"><span class="{iconType} {rightArrow}"></span> </th>' + '</tr>' + '</thead>',
            contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>',
            footTemplate: '<tfoot>' + '<tr><th colspan="7" class="today"></th></tr>' + '<tr><th colspan="7" class="clear"></th></tr>' + '</tfoot>'
        };
    DPGlobal.template = '<div class="datetimepicker">' + '<div class="datetimepicker-minutes">' + '<table class=" table-condensed">' + DPGlobal.headTemplate + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-hours">' + '<table class=" table-condensed">' + DPGlobal.headTemplate + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-days">' + '<table class=" table-condensed">' + DPGlobal.headTemplate + '<tbody></tbody>' + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-months">' + '<table class="table-condensed">' + DPGlobal.headTemplate + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-years">' + '<table class="table-condensed">' + DPGlobal.headTemplate + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '</div>';
    DPGlobal.templateV3 = '<div class="datetimepicker">' + '<div class="datetimepicker-minutes">' + '<table class=" table-condensed">' + DPGlobal.headTemplateV3 + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-hours">' + '<table class=" table-condensed">' + DPGlobal.headTemplateV3 + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-days">' + '<table class=" table-condensed">' + DPGlobal.headTemplateV3 + '<tbody></tbody>' + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-months">' + '<table class="table-condensed">' + DPGlobal.headTemplateV3 + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '<div class="datetimepicker-years">' + '<table class="table-condensed">' + DPGlobal.headTemplateV3 + DPGlobal.contTemplate + DPGlobal.footTemplate + '</table>' + '</div>' + '</div>';
    $.fn.datetimepicker.DPGlobal = DPGlobal;
    $.fn.datetimepicker.noConflict = function() { $.fn.datetimepicker = old; return this };
    $(document).on('focus.datetimepicker.data-api click.datetimepicker.data-api', '[data-provide="datetimepicker"]', function(e) {
        var $this = $(this);
        if ($this.data('datetimepicker')) return;
        e.preventDefault();
        $this.datetimepicker('show')
    });
    $(function() { $('[data-provide="datetimepicker-inline"]').datetimepicker() })
});
$.fn.datetimepicker.dates.cn = { days: ['日', '一', '二', '三', '四', '五', '六', '日'], daysShort: ['日', '一', '二', '三', '四', '五', '六', '日'], daysMin: ['日', '一', '二', '三', '四', '五', '六', '日'], months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], monthsShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], meridiem: ['am', 'pm'], suffix: ['st', 'nd', 'rd', 'th'], today: '今天', clear: '清除' };
! function() {
    function r(e, n, t) {
        function o(i, f) {
            if (!n[i]) {
                if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a }
                var p = n[i] = { exports: {} };
                e[i][0].call(p.exports, function(r) { var n; return o(e[i][1][r] || r) }, p, p.exports, r, e, n, t)
            }
            return n[i].exports
        }
        for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) o(t[i]);
        return o
    }
    return r
}()({
    1: [function(require, module, exports) {
        var validator = require('../../../vendor/scripts/validator.min');
        ! function(root, factory) {
            if ('function' === typeof define && define.amd) define([], factory);
            else if ('object' === typeof exports) module.exports = factory();
            else root.returnExports = factory()
        }(this, function() {
            function getParam() {
                var url, paramArr = window.location.href.split('/'),
                    lastParam, targetParam = paramArr[paramArr.length - 1].split("?"),
                    targetStr;
                if ('devType=0' == targetParam[targetParam.length - 1]) return !0;
                else return !1
            }
            var message = {},
                originMessage = {},
                defaultMsg = '网络异常，请稍后重试',
                userPwd1 = '',
                mainContent = $('.main-content'),
                $form = $('.validation'),
                $mustBeDifferent = $form.find('[data-type="mustbedifferent"]'),
                $errorMsg = $('#errorMsg'),
                $notification = $('.modal-body .alert-warning'),
                $loading = $('.loading-shadow'),
                eventMap = {},
                timeout = 0,
                paraArr = [],
                paraStr = '',
                passwordLevel = function(pwd) { var ls = 0; if (pwd.match(/([a-z])+/)) ls++; if (pwd.match(/([0-9])+/)) ls++; if (pwd.match(/([A-Z])+/)) ls++; if (pwd.match(/[^a-zA-Z0-9]+/)) ls++; return ls },
                isEmail = function(email) { return -1 != email.search(/^(\w+((-\w+)|(\.\w+))*)+\w+((-\w+)|(\.\w+))*@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) },
                options = {
                    errorCallback: function(unvalidFields) { $(unvalidFields).each(function(i, item) { if (0 == i && mainContent.length > 0) mainContent.animate({ scrollTop: mainContent.scrollTop() + item.$el.offset().top - parseInt($('body').css('padding-top')) }, 500) }) },
                    after: function(b) {
                        if ((new Date).getTime() - justNow < 1500) return;
                        justNow = (new Date).getTime();
                        if ($('.validation:visible').attr('next')) {
                            $('.validation:visible').removeAttr('next');
                            var ename = 'next-step';
                            if ('undefined' === typeof eventMap[ename]) eventMap[ename] = $.Event(ename);
                            $('body').trigger(eventMap[ename]);
                            return !1
                        }
                        if (getParam()) {
                            $loading.show();
                            $loading.find('.loading-text').show().html('正在验证中...')
                        } else $loading.show();
                        var url = $('.validation:visible').attr('redirect') || '/',
                            paras = $('.validation:visible').attr('data-param'),
                            callback = $('.validation:visible').attr('callback'),
                            pushAppid = $('.validation:visible').attr('pushAppid'),
                            noRedirect = $('.validation:visible').attr('noredirect'),
                            needLogout = $('.validation:visible').attr('logout'),
                            needReload = $('.validation:visible').attr('needreload'),
                            needChangeRedirect = $('.validation:visible').attr('needchangeredirect'),
                            showErrMsgHere = $('.validation:visible').attr('showErrMsgHere'),
                            needCaptcha = $('.validation:visible').attr('needCaptcha'),
                            modalMessage = $('.validation:visible').attr('message'),
                            formDataDealer = $('.validation:visible').attr('formDataDealer'),
                            successMessageDealer = $('.validation:visible').attr('successMessageDealer'),
                            onSuccessDealer = $('.validation:visible').attr('onSuccessDealer'),
                            errorCallback = $(".validation:visible").attr("errCallback");
                        $.ajax({
                            type: "POST",
                            url: $('.validation:visible').attr('action'),
                            data: 'function' === typeof window[formDataDealer] ? window[formDataDealer]() : $('.validation:visible').serialize(),
                            success: function(res) {
                                $loading.hide();
                                if (0 === res.errno) {
                                    if (paras) paraArr = paras.split(',');
                                    for (var i = 0; i < paraArr.length; i++) paraStr = paraStr + paraArr[i] + '=' + $('.validation:visible').find('[name="' + paraArr[i] + '"]').val();
                                    if (pushAppid && paraArr.indexOf('app_id') < 0) paraStr = paraStr + 'app_id=' + res.data['app_id'];
                                    if (modalMessage) {
                                        $('#commonModal').css({ zIndex: 999999 });
                                        if ('function' === typeof window[successMessageDealer]) window[successMessageDealer]($('#commonModal'));
                                        else $('#commonModal .modal-body').text(modalMessage);
                                        timeout = 3e3
                                    }
                                    $('#commonModal').modal('show');
                                    setTimeout(function() {
                                        $('#commonModal').modal('hide');
                                        $('body').removeClass('modal-open');
                                        $('.modal-backdrop').remove();
                                        if (needReload) window.location.reload();
                                        if (callback) {
                                            var ename;
                                            if ('undefined' === typeof eventMap[ename = 'admin-redirect']) eventMap[ename] = $.Event(ename);
                                            window.admin_url = url;
                                            $('body').trigger(eventMap[ename])
                                        } else if (onSuccessDealer && 'function' == typeof window[onSuccessDealer]) window[onSuccessDealer](res);
                                        else {
                                            if (noRedirect) return !1;
                                            if (needLogout) { $.ajax({ type: "POST", url: '/user/logout', success: function(res) { if (0 === res.errno) window.location.reload() } }); return !1 }
                                            if (paraStr) window.location = url + ('-1' != url.indexOf('?') ? '&' : '?') + paraStr;
                                            else window.location = url;
                                            if (needChangeRedirect) {
                                                var ename;
                                                if ('undefined' === typeof eventMap[ename = 'change-redirect']) eventMap[ename] = $.Event(ename);
                                                $('body').trigger(eventMap[ename])
                                            }
                                        }
                                    }, timeout)
                                } else if (800017 === res.errno) {
                                    var email = res.data.email || $('input[name="userName"]').val();
                                    if (!isEmail(email)) $('.modal:visible .alert-warning').text('您的账户还未激活，请您使用邮箱登录').show();
                                    else window.location = '/user/account/notifyemail?type=1&email=' + (res.data.email || $('input[name="userName"]').val())
                                } else {
                                    if (showErrMsgHere) $('.modal:visible .alert-warning').text(res.data.message).show();
                                    else if (errorCallback && "function" == typeof window[errorCallback]) window[errorCallback](res);
                                    else if ($errorMsg) {
                                        $errorMsg.find('.modal-body p').text(res.data.message);
                                        $errorMsg.modal('show')
                                    }
                                    setTimeout(function() { $errorMsg.modal('hide') }, 3e3);
                                    if (needCaptcha) {
                                        var ename = 'reset-captcha';
                                        if ('undefined' === typeof eventMap[ename]) eventMap[ename] = $.Event(ename);
                                        $('body').trigger(eventMap[ename])
                                    }
                                }
                            }
                        })
                    },
                    isErrorOnParent: !0
                },
                patterns = {
                    username: function(text) {
                        var userName = $.trim(text),
                            userName_validate = userName.match(/[\s\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=,;\\\\]+/),
                            userName_validate2 = userName.match(/[\uFF00-\uFFFF]/),
                            userName_len = userName.length,
                            pass = !0;
                        if (!message['username']) message['username'] = '';
                        if (!message['userName']) message['userName'] = '';
                        if (userName_len > 12) {
                            message['username'] = message['userName'] = '用户名不能大于12个字符';
                            pass = !1
                        } else if (userName_len < 2) {
                            message['username'] = message['userName'] = '用户名不能小于2个字符';
                            pass = !1
                        } else if (!isNaN(userName)) {
                            message['username'] = message['userName'] = '用户名不能为纯数字';
                            pass = !1
                        } else if (userName_validate2) {
                            message['username'] = message['userName'] = '用户名只能有数字,字母,汉字';
                            pass = !1
                        } else if (userName_validate) {
                            message['username'] = message['userName'] = '用户名只能有数字,字母,汉字';
                            pass = !1
                        } else pass = !0;
                        return pass
                    },
                    email: function(text) {
                        var email = $.trim(text),
                            pass = !0;
                        if (!isEmail(email)) {
                            message['email'] = '邮箱格式错误';
                            message['business_email'] = '邮箱格式错误';
                            pass = !(message['contactEmail'] = '邮箱格式错误')
                        } else pass = !0;
                        return pass
                    },
                    pwd: function(text) {
                        var isPasswordRegex = /^[0-9a-zA-Z_]{0,50}$/,
                            pass = !0;
                        if (0 == (userPwd1 = $.trim(text)).length) pass = !(message['password'] = "请输入密码");
                        else if (passwordLevel(userPwd1) < 3) pass = !(message['password'] = "密码必须包含大小写字母，数字");
                        else if (userPwd1.length < 6) pass = !(message['password'] = "密码不得短于6个字符");
                        else if (userPwd1.length > 16) pass = !(message['password'] = "密码不得超过16个字符");
                        else pass = !0;
                        if (0 == pass) userPwd1 = '';
                        return pass
                    },
                    repasswd: function(text) {
                        var pass = !0;
                        if (text != userPwd1) pass = !(message['repasswd'] = "确认密码与密码不一致");
                        else pass = !0;
                        return pass
                    },
                    mustbedifferent: function() {
                        var pass = !0,
                            tempVal = '';
                        $mustBeDifferent.each(function(i, n) {
                            if (n.value == tempVal) {
                                message['mustbedifferent'] = message['app_subname'] = "运营字段不可与软件名称一样";
                                pass = !1
                            }
                            tempVal = n.value
                        });
                        return pass
                    },
                    companyname: function(text) {
                        var name = $.trim(text),
                            name_validate = name.match(/[\s\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=,;\\\\]+/),
                            name_length = name.length,
                            pass = !0;
                        if (name_length > 50 || name_length < 2) pass = !(message['companyname'] = "公司注册名称为2-50个字符");
                        else if (name_validate) pass = !(message['companyname'] = "公司注册名称不能有非法字符");
                        else pass = !0;
                        return pass
                    },
                    legalname: function(text) {
                        var name = $.trim(text),
                            name_validate = name.match(/[\s\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=,;\\\\]+/),
                            name_validate2 = name.match(/[\uFF00-\uFFFF]/),
                            pass = !0;
                        if (!isNaN(name)) pass = !(message['legalname'] = "法人代表名不能为纯数字");
                        else if (name.length < 2 || name.length > 30) pass = !(message['legalname'] = "法人代表名长度为2-30个字符");
                        else pass = !0;
                        return pass
                    },
                    idcard: function(text) {
                        var idCard = $.trim(text),
                            regIdCard = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
                            pass = !0;
                        if (idCard.match(regIdCard)) {
                            if (18 == idCard.length) {
                                for (var idCardWi = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], idCardY = [1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2], idCardWiSum = 0, i = 0; i < 17; i++) idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
                                var idCardMod = idCardWiSum % 11,
                                    idCardLast = idCard.substring(17);
                                if (2 == idCardMod)
                                    if ("x" == idCardLast.toLowerCase()) pass = !0;
                                    else {
                                        message['ownerCardId'] = "身份证号码错误！";
                                        pass = !(message['idcard'] = "身份证号码错误！")
                                    }
                                else if (idCardLast == idCardY[idCardMod]) return !0;
                                else {
                                    message['ownerCardId'] = "身份证号码错误！";
                                    pass = !(message['idcard'] = "身份证号码错误！")
                                }
                            }
                        } else {
                            message['ownerCardId'] = "身份证格式不正确!";
                            pass = !(message['idcard'] = "身份证格式不正确!")
                        }
                        return pass
                    },
                    orgcode: function(text) {
                        var orgcode, orgcode_length = $.trim(text).length,
                            pass = !0;
                        if (10 != orgcode_length && 9 != orgcode_length) {
                            message['orgcode'] = "请输入统一信用代码的第九位到倒数第二位";
                            pass = !(message['orgCode'] = "请输入统一信用代码的第九位到倒数第二位")
                        }
                        return pass
                    },
                    saleid: function(text) {
                        var saleid = $.trim(text),
                            saleid_length = saleid.length,
                            pass = !0;
                        message['licenceCode'] = "请填写与企业营业执照或三证合一证件保持一致";
                        message['saleid'] = "请填写与企业营业执照或三证合一证件保持一致";
                        if (!saleid.match(/^[0-9a-zA-Z]{11,20}$/)) {
                            message['licenceCode'] = "请输入正确的营业执照号码";
                            pass = !(message['saleid'] = "请输入正确的营业执照号码")
                        } else if (saleid_length < 11) {
                            message['licenceCode'] = "营业执照号大于11位";
                            pass = !(message['saleid'] = "营业执照号大于11位")
                        } else if (saleid_length > 20) {
                            message['licenceCode'] = "营业执照号小于20位";
                            pass = !(message['saleid'] = "营业执照号小于20位")
                        } else if (15 != saleid_length && 18 != saleid_length) {
                            message['licenceCode'] = "营业执照号必须为15位数或者18位数社会信用代码";
                            pass = !(message['saleid'] = "营业执照号必须为15位数或者18位数社会信用代码")
                        }
                        return pass
                    },
                    tel: function(text) {
                        var tel = $.trim(text),
                            pass = !0;
                        if ('' != tel && !/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(tel)) pass = !(message['tel'] = '座机号不正确');
                        else if (isNaN(tel)) pass = !(message['tel'] = '电话格式不对');
                        else pass = !0;
                        return pass
                    },
                    mobile: function(text) {
                        var tel = $.trim(text),
                            pass = !0;
                        if ('' != tel && !/^1\d{10}$/.test(tel)) {
                            message['mobile'] = '手机号码格式不正确';
                            message['phone'] = '手机号码格式不正确';
                            message['contactMobile'] = '手机号码格式不正确';
                            message['business_phone'] = '手机号码格式不正确';
                            message['business_mobile'] = '手机号码格式不正确';
                            message['contactMobileNo'] = '手机号码格式不正确';
                            pass = !(message['contact_phone'] = '手机号码格式不正确')
                        } else pass = !0;
                        return pass
                    },
                    realname: function(text) {
                        var name = $.trim(text),
                            Name_validate = name.match(/[\s\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=,;\\\\]+/),
                            name_length = name.length,
                            pass = !0;
                        if (name_length > 30 || name_length < 2) {
                            message['realname'] = message['business_username'] = '联系人姓名为2-30个字符';
                            pass = !1
                        } else if (Name_validate) {
                            message['realname'] = message['business_username'] = '联系人姓名不能有非法字符';
                            pass = !1
                        } else pass = !0;
                        return pass
                    },
                    qq: function(text) {
                        var qq = $.trim(text),
                            pass = !0;
                        if (qq.length < 1) {
                            message['qq'] = '请填写QQ号';
                            pass = !(message['contactQQ'] = '请填写QQ号')
                        } else if (qq.length > 0)
                            if (/^[1-9]\d{4,10}$/.test(qq)) pass = !0;
                            else {
                                message['qq'] = 'QQ号格式不正确';
                                pass = !(message['contactQQ'] = 'QQ号格式不正确')
                            }
                        else pass = !0;
                        return pass
                    },
                    appName: function(text) {
                        var pass = !0,
                            appName, nameLength;

                        function getBLen(str) { if (null == str) return 0; if ("string" != typeof str) str += ""; return str.replace(/[^\x00-\xff]/g, "01").length }
                        if (getBLen($.trim(text)) > 30) pass = !(message['app_name'] = '应用名称不得超过15个汉字字符或30个英文字符');
                        return pass
                    },
                    gamename: function(text) {
                        var app_name = $.trim(text),
                            app_id = $('#app_id').val(),
                            pass = !0;
                        if (0 == app_name.length || 0 == $.trim(app_name).length) pass = !(message['gamename'] = "请输入游戏名称");
                        return pass
                    },
                    oneword: function(text) {
                        var oneword = $.trim(text),
                            oneword_validate = oneword.match(/[\s\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=\，\。\、\‘\’\“\”\[\]\【\】\,;\\\\]+/),
                            oneword_validate2 = oneword.match(/[\uFF00-\uFFFF]/),
                            pass = !0;
                        if (oneword_validate) {
                            message['oneword'] = '一句话简介不能包含任何标点符号和空格';
                            message['summary'] = '一句话简介不能包含任何标点符号和空格';
                            message['app_subname'] = '运营字段不能包含标点符号和空格';
                            message['oneword_desc'] = '一句话简介不能包含任何标点符号和空格';
                            message['service_account_name'] = '服务号昵称不能包含任何标点符号和空格';
                            return pass = !(message['sub_name'] = '运营字段不能包含标点符号和空格')
                        } else if (oneword_validate2) {
                            message['oneword'] = '一句话简介不能包含任何标点符号和空格';
                            message['summary'] = '一句话简介不能包含任何标点符号和空格';
                            message['app_subname'] = '运营字段不能包含标点符号和空格';
                            message['oneword_desc'] = '一句话简介不能包含任何标点符号和空格';
                            message['service_account_name'] = '服务号昵称不能包含任何标点符号和空格';
                            pass = !(message['sub_name'] = '运营字段不能包含标点符号和空格')
                        }
                        return pass
                    },
                    appdesc: function(text) {
                        var desc = $.trim(text),
                            pass = !0;
                        if (desc.length < 50) pass = !(message['appdesc'] = '不能少于 50 个字');
                        else if (desc.length >= 1500) pass = !(message['appdesc'] = '不能超过 1500 个字');
                        return pass
                    },
                    verdesc: function(text) {
                        var desc = $.trim(text),
                            pass = !0;
                        if (desc.length < 10) pass = !(message['verdesc'] = '不能少于 10 个字');
                        else if (desc.length >= 1500) pass = !(message['verdesc'] = '不能超过 1500 个字');
                        return pass
                    },
                    bankcode: function(text) {
                        var bankcode, bankcode_validate, pass = !0;
                        if (!$.trim(text.replace(/\s/g, '')).match(/^\d{5,25}$/)) pass = !(message['bankcode'] = "请输入正确的银行卡号");
                        else pass = !0;
                        return pass
                    },
                    postcode: function(text) {
                        var postcode, postcode_validate, pass = !0;
                        if (!$.trim(text).match(/^[1-9][0-9]{5}$/)) pass = !(message['postcode'] = "邮政编码格式不正确！邮编由首位不为0，共6位数字组成，如51800");
                        else pass = !0;
                        return pass
                    },
                    pkgNameEndStr: function(text) {
                        var pkgStandard = ".nearme.gamecenter",
                            pkgname, pass = !0,
                            endWith;
                        if (function(str, endStr) { var d = str.length - endStr.length; return d >= 0 && str.lastIndexOf(endStr) == d }($.trim(text), pkgStandard)) pass = !0;
                        else pass = !(message['pkgNameEndStr'] = "游戏包名必须以“nearme.gamecenter”结尾");
                        return pass
                    },
                    forbiddenWord: function(text) { return !0 },
                    screenshots: function(text) {
                        for (var files = text.split(","), screenshotsNumber = files.length, pass = !0, i = 0; i < files.length; i++)
                            if ('' == files[i]) screenshotsNumber--;
                        if (screenshotsNumber < 3) pass = !(message['pic_url'] = "请上传3-5张截图");
                        return pass
                    },
                    screenshots2: function(text) {
                        for (var files = text.split(","), screenshotsNumber = files.length, pass = !0, i = 0; i < files.length; i++)
                            if ('' == files[i]) screenshotsNumber--;
                        if (screenshotsNumber < 4) pass = !(message['pictures_url'] = "请上传4-5张截图");
                        return pass
                    },
                    screenshots3: function(text) {
                        for (var files = text.split(","), screenshotsNumber = files.length, pass = !0, i = 0; i < files.length; i++)
                            if ('' == files[i]) screenshotsNumber--;
                        if (screenshotsNumber < 2) pass = !(message['pictures_url'] = "请上传2-5张截图");
                        return pass
                    },
                    copyrights: function(text) {
                        for (var files = text.split(","), copyrightsNumber = files.length, pass = !0, i = 0; i < files.length; i++)
                            if ('' == files[i]) copyrightsNumber--;
                        if (copyrightsNumber < 1) pass = !(message['copyright_url'] = "请上传1-3个其他市场后台上架截图");
                        return pass
                    },
                    whiteList: function(text) {
                        var textArray, pass = !0;
                        if ((text = text.replace(/[\n\r]/g, ",")).split(",").length > 5) pass = !(message['whiteList'] = "测试名单不能为空，一行一个，测试名单最多5个");
                        else $('[name="whiteList"]').val(text);
                        return pass
                    },
                    integer: function(text) {
                        var integer, integer_validate, pass = !0;
                        if (!$.trim(text).match(/^\+?[1-9][0-9]*$/)) {
                            message['amount'] = "输入内容必须为整数数字";
                            message['maxCutAmount'] = "输入内容必须为整数数字";
                            message['totalNum'] = "输入内容必须为整数数字";
                            message['participateTimes'] = "输入内容必须为整数数字";
                            pass = !(message['totalAttendTimes'] = "输入内容必须为整数数字")
                        } else {
                            message['amount'] = "请填写充值金额";
                            message['maxCutAmount'] = "请填写单笔最高优惠金额";
                            message['totalNum'] = "请填写红包总个数";
                            message['participateTimes'] = "请填写单个用户参与次数";
                            message['totalAttendTimes'] = "请填写活动总参与次数"
                        }
                        return pass
                    },
                    rate: function(text) {
                        var rate = $.trim(text),
                            rate_validate, pass = !0;
                        if (!rate.match(/^\+?[1-9][0-9]*$/)) pass = !(message['rate'] = "输入内容必须为整数数字");
                        else if (rate >= 100) pass = !(message['rate'] = "请输入1到99之间的数字");
                        else message['rate'] = "请填写折扣率";
                        return pass
                    },
                    cutAmount: function(text) {
                        var cutAmount = $.trim(text),
                            amount = $('[name="amount"]').val(),
                            cutAmount_validate, pass = !0;
                        if (!cutAmount.match(/^\+?[1-9][0-9]*$/)) pass = !(message['cutAmount'] = "输入内容必须为整数数字");
                        else if (parseInt(cutAmount) >= parseInt(amount)) pass = !(message['cutAmount'] = "优惠金额不得超过上述充值满的金额");
                        else message['cutAmount'] = "请填写优惠金额";
                        return pass
                    },
                    redPacketAmount: function(text) {
                        var redPacketAmount = $.trim(text),
                            radioChannelType = $('[name="radioChannelType"]:checked').val(),
                            redPacketAmount_validate, pass = !0;
                        if (!redPacketAmount.match(/^(\d+\.\d{1,1}|\d+)$/)) pass = !(message['redPacketAmount'] = "内容必须是数字，最多保留一位小数");
                        else if ('ALIPAY' == radioChannelType && redPacketAmount < .2) pass = !(message['redPacketAmount'] = "支付宝最低金额为0.2元");
                        else if ('WECHAT' == radioChannelType && redPacketAmount < 1) pass = !(message['redPacketAmount'] = "微信最低金额为1元");
                        else message['redPacketAmount'] = "请填写红包金额";
                        return pass
                    },
                    returnUrl: function(text) {
                        var returnUrl = $.trim(text),
                            len = returnUrl.length - 1,
                            returnUrl_validate = returnUrl.match(/^(\d+\.\d{1,1}|\d+)$/),
                            pass = !0;
                        if (-1 != returnUrl.search(/\?/)) pass = !1;
                        else if ('/' == returnUrl[len]) pass = !1;
                        else if (returnUrl.length > 255) pass = !1;
                        else if ('https://' != returnUrl.substring(0, 8))
                            if ('http://' == returnUrl.substring(0, 7)) return pass = !0;
                            else pass = !1;
                        return pass
                    },
                    worksUrl: function(text) {
                        var worksUrl = $.trim(text),
                            check = new RegExp("<script>"),
                            pass = !0;
                        if (/^https?:\/\//.test(worksUrl)) {
                            pass = !0;
                            if (check.test(text)) {
                                pass = !1;
                                message['return_url'] = '存在异常文本，请输入正确的回调地址'
                            }
                            return pass
                        } else pass = !(message['return_url'] = '请填写回调地址，以http://或者https://开头');
                        message['return_url'] = '请填写回调地址，以http://或者https://开头';
                        return pass
                    },
                    checkVersion: function(text) { var pass = !0; if (/[\u4e00-\u9fa5]/.test(text)) return pass = !1; return pass },
                    checkExtraTags: function(text) { if (/^[\u4e00-\u9fa5]+$/.test(text)) return !0; return !1 },
                    payKey: function(text) {
                        var pass = !0;
                        if (text.length > 216) {
                            pass = !1;
                            message['pay_key'] = '长度超过216,必须生成1024位的秘钥,长度必须是216'
                        } else if (text.length < 216) {
                            pass = !1;
                            message['pay_key'] = '长度不等于216,必须生成1024位的秘钥,长度必须是216'
                        }
                        message['pay_key'] = '长度不等于216,必须生成1024位的秘钥,长度必须是216';
                        return pass
                    },
                    numberAndLetter: function(text) {
                        var pass = !0;
                        if (!(text = $.trim(text)).match(/^\+?[A-Za-z0-9]*$/)) {
                            pass = !1;
                            message['event_name'] = '事件标识只能输入数字与字母'
                        } else message['event_name'] = '请填写事件标识';
                        return pass
                    },
                    mediaAccountName: function(text) {
                        function getBLen(str) { if (null == str) return 0; if ("string" != typeof str) str += ""; return str.replace(/[^\x00-\xff]/g, "01").length }
                        var oneword = $.trim(text),
                            oneword_validate = oneword.match(/[\s\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=\，\。\、\‘\’\“\”\[\]\【\】\,;\\\\]+/),
                            oneword_validate2 = oneword.match(/[\uFF00-\uFFFF]/);
                        if (oneword_validate) return !(message['media_account_name'] = '内容号名称不能包含标点符号');
                        else if (oneword_validate2) return !(message['media_account_name'] = '内容号名称不能包含标点符号');
                        else {
                            var nameLength = getBLen(text = $.trim(text));
                            if (0 == nameLength) return !(message['media_account_name'] = '请填写内容号名称');
                            else if (nameLength < 4 || nameLength > 20) return !(message['media_account_name'] = '内容号名称长度必须2-10个汉字或4-20个字母');
                            return !0
                        }
                    },
                    serviceAccountName: function(text) {
                        function getBLen(str) { if (null == str) return 0; if ("string" != typeof str) str += ""; return str.replace(/[^\x00-\xff]/g, "01").length }
                        var oneword = $.trim(text),
                            oneword_validate = oneword.match(/[\<\>\/\|\!\#\@\$\^\&\*\(\)\{\}\:\'\"\.\?\-\+\=\，\。\、\‘\’\“\”\[\]\【\】\,;\\\\]+/),
                            oneword_validate2 = oneword.match(/[\uFF00-\uFFFF]/);
                        if (oneword_validate) return !(message['service_account_name'] = '服务号名称不能包含标点符号');
                        else if (oneword_validate2) return !(message['service_account_name'] = '服务号名称不能包含标点符号');
                        else {
                            var nameLength = getBLen(text = $.trim(text));
                            if (0 == nameLength) return !(message['service_account_name'] = '请填写服务号名称');
                            else if (nameLength < 4 || nameLength > 20) return !(message['service_account_name'] = '服务号名称长度必须2-10个汉字或4-20个字母');
                            return !0
                        }
                    },
                    lengthLimit: function(val, $ele) {
                        if ('' == val) return !0;
                        var maxleng = parseInt($ele.attr('max-length')),
                            minleng = parseInt($ele.attr('min-length')),
                            $tips = $ele.parent().find('.error-tip');
                        void 0 === $tips.attr('error-tip') ? $tips.attr('error-tip', $tips.text()) : '';
                        if (val.length > maxleng) { $tips.text($tips.attr('error-tip') + '，已经超过' + (val.length - maxleng) + '个字。'); return !1 }
                        if (val.length < minleng) { $tips.text($tips.attr('error-tip') + '，还少' + (minleng - val.length) + '个字。'); return !1 }
                        return !0
                    },
                    productName: function(text) {
                        var text = $.trim(text);
                        if (/^[\u4E00-\u9FA5\w\d]+$/u.test(text)) return !0;
                        else {
                            message['methodName'] = '方法名称不能为空，由汉字、字母、数字、下划线组成，不超过15个字符';
                            message['methodDescription'] = '方法描述不能为空，由汉字、字母、数字、下划线组成，不超过150个字符';
                            message['eventDescription'] = '事件内容不能为空，由汉字、字母、数字、下划线组成，不超过50个字符';
                            return !(message['name'] = '产品名称不能为空，由汉字、字母、数字、下划线组成，不超过40个字符')
                        }
                    },
                    productCode: function(text) {
                        var text = $.trim(text);
                        if (/^[0-9a-zA-Z_]{1,}$/.test(text)) return !0;
                        else {
                            message['propertyCode'] = '属性编码不能为空，由字母、数字、下划线组成，不超过64个字符';
                            message['methodCode'] = '方法标识不能为空，由字母、数字、下划线组成，不超过50个字符';
                            message['eventCode'] = '事件标识不能为空，由字母、数字、下划线组成，不超过50个字符';
                            return !(message['series'] = '产品序列号不能为空，由字母、数字、下划线组成，不超过100个字符')
                        }
                    },
                    productSpecial: function(text) {
                        var text = $.trim(text);
                        if (/^[\u4E00-\u9FA5\w\d\.\-\s]+$/u.test(text)) return !0;
                        else { message['propertyName'] = '属性名不能为空，由汉字、字母、数字、下划线组成，不超过10个字符'; return !(message['eventName'] = '事件名称不能为空，由汉字、字母、数字、下划线组成，不超过30个字符') }
                    }
                };
            $('input[required]').on('after:length-limit', function(event, element) {
                var iptEl = $(element),
                    errorEl = iptEl.parent().find('.error-tip');
                if (patterns.lengthLimit(iptEl.val(), iptEl)) errorEl.text(errorEl.attr('error-tip'));
                else iptEl.parent().addClass('error empty')
            });
            $('textarea[required]').on('after:length-limit', function(event, element) {
                var iptEl = $(element),
                    errorEl = iptEl.parent().find('.error-tip');
                if (patterns.lengthLimit(iptEl.val(), iptEl)) errorEl.text(errorEl.attr('error-tip'));
                else iptEl.parent().addClass('error empty')
            });
            $('input[required]').on('after:change-msg', function(event, element) {
                var iptEl = $(element),
                    errorEl = iptEl.parent().find('.error-tip'),
                    iptType = iptEl.attr('name') || iptEl.attr('data-type') || iptEl.attr('type');
                if (!originMessage[iptType]) originMessage[iptType] = errorEl.text();
                errorEl.text(message[iptType] || originMessage[iptType])
            });
            $('textarea[required]').on('after:change-msg', function(event, element) {
                var textareaEl = $(element),
                    errorEl = textareaEl.parent().find('.error-tip'),
                    textareaType = textareaEl.attr('name');
                if (!originMessage[textareaType]) originMessage[textareaType] = errorEl.text();
                errorEl.text(message[textareaType] || originMessage[textareaType])
            });
            $('[needTrim]').bind('keyup', function(e) { $(this).val($(this).val().replace(/\s+/g, '')) });
            $form.on("submit", function(event) { event.preventDefault() });
            $form.validator(options, patterns, message);
            return { form: $form, options: options, patterns: patterns, message: message }
        })
    }, { "../../../vendor/scripts/validator.min": 2 }],
    2: [function(require, module, exports) {
        ~ function($) {
            var patterns, fields, errorElement, addErrorClass, removeErrorClass, novalidate, validateForm, validate, validateFields, removeFromUnvalidFields, asyncValidate, getVal, aorbValidate, validateReturn, unvalidFields = [],
                frontValidation, messages, protocols, userInfo, domain, port, ip, address, domainType, ipType, rDomain, rIP;
            patterns = {
                email: function(text) { return /^(?:[a-z0-9]+[_\-+.]+)*[a-z0-9]+@(?:([a-z0-9]+-?)*[a-z0-9]+.)+([a-z]{2,})+$/i.test(text) },
                date: function(text) {
                    var reg = /^([1-2]\d{3})([-/.])?(1[0-2]|0?[1-9])([-/.])?([1-2]\d|3[01]|0?[1-9])$/,
                        taste, d, year, month, day;
                    if (!reg.test(text)) return !1;
                    year = +(taste = reg.exec(text))[1];
                    month = +taste[3] - 1;
                    day = +taste[5];
                    return year === (d = new Date(year, month, day)).getFullYear() && month === d.getMonth() && day === d.getDate()
                },
                mobile: function(text) { return /^1[3-9]\d{9}$/.test(text) },
                tel: function(text) { return /^(?:(?:0\d{2,3}[- *]?[1-9]\d{6,7})|(?:[48]00[- *]?[1-9]\d{6}))$/.test(text) },
                number: function(input) {
                    var min = $.trim(this.$item.attr('min')),
                        max = $.trim(this.$item.attr('max')),
                        result = /^\-?(?:[1-9]\d*|0)(?:[.]\d+)?$/.test(input),
                        text = +input,
                        step = $.trim(this.$item.attr('step'));
                    min = '' === min || isNaN(min) ? text - 1 : +min;
                    max = '' === max || isNaN(max) ? text + 1 : +max;
                    step = '' === step || isNaN(step) ? 0 : +step;
                    return result && (0 >= step ? text >= min && text <= max : 0 === (text + min) % step && text >= min && text <= max)
                },
                range: function(text) { return this.number(text) },
                url: (protocols = '((https?|s?ftp|irc[6s]?|git|afp|telnet|smb):\\/\\/)?', userInfo = '([a-z0-9]\\w*(\\:[\\S]+)?\\@)?', port = '(:\\d{1,5})?', address = '(\\/\\S*)?', ipType = [protocols, userInfo, '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}', port, address], rDomain = new RegExp('^' + [protocols, userInfo, '(?:localhost|(?:[a-z0-9]+(?:[-\\w]*[a-z0-9])?(?:\\.[a-z0-9][-\\w]*[a-z0-9])*)*\\.[a-z]{2,})', port, address].join('') + '$', 'i'), rIP = new RegExp('^' + ipType.join('') + '$', 'i'), function(text) { return rDomain.test(text) || rIP.test(text) }),
                password: function(text) { return this.text(text) },
                checkbox: function() { return patterns._checker('checkbox') },
                radio: function() { return patterns._checker('radio') },
                _checker: function(type) {
                    var form = this.$item.parents('form').eq(0),
                        identifier = 'input[type=' + type + '][name="' + this.$item.attr('name') + '"]',
                        result = !1,
                        $items;
                    $(identifier, form).each(function(i, item) { if (item.checked && !result) return result = !0 });
                    return result
                },
                text: function(text) {
                    if (!(text = $.trim(text)).length) return;
                    var max = parseInt(this.$item.attr('maxlength'), 10),
                        min = parseInt(this.$item.attr('minlength'), 10),
                        range;
                    return (range = function() {
                        var ret = !0,
                            length = text.length;
                        if (min) ret = length >= min;
                        if (max) ret = ret && length <= max;
                        return ret
                    })()
                }
            };
            asyncValidate = function($item, klass, isErrorOnParent) {
                var data = $item.data(),
                    url = data.remote,
                    method = data.method || 'get',
                    key = data.key || 'key',
                    text = getVal($item),
                    params = {};
                params[key] = text;
                $[method](url, params).success(function(isValidate) {
                    var message = 0 === isValidate.errno ? 'IM VALIDED' : 'unvalid',
                        type = $item.attr('name') || $item.attr('data-type') || $item.attr('type') || 'text';
                    messages[type] = isValidate.data.message;
                    return validateReturn.call(this, $item, klass, isErrorOnParent, message)
                }).error(function() {})
            };
            aorbValidate = function($item, klass, isErrorOnParent) {
                var id = 'a' === $item.data('aorb') ? 'b' : 'a',
                    $pair = $('[data-aorb=' + id + '][name=' + $item.attr('name') + ']', $item.parents('form').eq(0)),
                    a = [$item, klass, isErrorOnParent],
                    b = [$pair, klass, isErrorOnParent],
                    result = 0;
                result += validateReturn.apply(this, a) ? 0 : 1;
                return result = (result += validateReturn.apply(this, b) ? 0 : 1) > 0 ? (removeErrorClass.apply(this, a), removeErrorClass.apply(this, b), !1) : validateReturn.apply(this, a.concat('unvalid'))
            };
            validateReturn = function($item, klass, parent, message) {
                if (!1 === $item.is(':visible')) return !1;
                if (!$item) return 'DONT VALIDATE UNEXIST ELEMENT';
                var pattern, type, val, ret, event;
                (pattern = $item.attr('pattern')) && pattern.replace('\\', '\\\\');
                type = $item.attr('data-type') || $item.attr('type') || 'text';
                type = patterns[type] ? type : 'text';
                val = $.trim(getVal($item));
                event = $item.data('event');
                if ('undefined' !== typeof $item.attr('checknoempty') && '' === val) return !1;
                if ('unvalid' === (message = message ? message : pattern ? new RegExp(pattern).test(val) || 'unvalid' : patterns[type](val) || 'unvalid')) removeErrorClass($item, klass, parent);
                return /^(?:unvalid|empty)$/.test(message) ? (ret = { $el: addErrorClass.call(this, $item, klass, parent, message), type: type, error: message }, $item.trigger('after:' + event, $item), ret) : (removeErrorClass.call(this, $item, klass, parent), $item.trigger('after:' + event, $item), !1)
            };
            fields = function(identifie, form) { return $(identifie, form) };
            getVal = function($item) { return $item.val() || ($item.is('[contenteditable]') ? $item.text() : '') };
            validate = function($item, klass, parent) {
                var async, aorb, type, val, commonArgs, event;
                type = (patterns.$item = $item).attr('type');
                val = getVal($item);
                async = $item.data('remote');
                aorb = $item.data('aorb');
                event = $item.data('event');
                commonArgs = [$item, klass, parent];
                event && $item.trigger('before:' + event, $item);
                if (!/^(?:radio|checkbox)$/.test(type) && !aorb && !patterns.text(val)) return validateReturn.call(this, $item, klass, parent, val.length ? 'unvalid' : 'empty');
                if (aorb) return aorbValidate.apply(this, commonArgs);
                if (async)
                    if (!(frontValidation = validateReturn.call(this, $item, klass, parent)) && $item.is(':visible')) return asyncValidate.apply(this, commonArgs);
                return validateReturn.call(this, $item, klass, parent)
            };
            validateFields = function($fields, method, klass, parent) {
                var reSpecialType = /^radio|checkbox/,
                    field;
                $.each($fields, function(i, f) {
                    $(f).on(reSpecialType.test(f.type) || 'SELECT' === f.tagName ? 'change blur' : method, function() {
                        var $items = $(this);
                        if (reSpecialType.test(this.type)) $items = $('input[type=' + this.type + '][name=' + this.name + ']', $items.closest('form'));
                        $items.each(function() {
                            (field = validate.call(this, $(this), klass, parent)) && unvalidFields.push(field)
                        })
                    })
                })
            };
            validateForm = function($fields, method, klass, parent) {
                if (method && !validateFields.length) return !0;
                unvalidFields = $.map($fields, function(el) { var field = validate.call(null, $(el), klass, parent); if (field) return field });
                return validateFields.length ? unvalidFields : !1
            };
            removeFromUnvalidFields = function($item) {
                var obj, index;
                if (!(obj = $.grep(unvalidFields, function(item) { return item.$el = $item })[0])) return;
                index = $.inArray(obj, unvalidFields);
                unvalidFields.splice(index, 1);
                return unvalidFields
            };
            errorElement = function($item, parent) { return $item.data('parent') ? $item.closest($item.data('parent')) : parent ? $item.parent() : $item };
            addErrorClass = function($item, klass, parent, emptyClass) { return errorElement($item, parent).addClass(klass + ' ' + emptyClass) };
            removeErrorClass = function($item, klass, parent) { removeFromUnvalidFields.call(this, $item); return errorElement($item, parent).removeClass(klass + ' empty unvalid') };
            novalidate = function($form) { return $form.attr('novalidate') || $form.attr('novalidate', 'true') };
            $.fn.validator = function(_options, ptns, msgs) {
                var $form = this,
                    options = _options || {},
                    identifie = options.identifie || '[required]',
                    klass = options.klass || 'error',
                    isErrorOnParent = options.isErrorOnParent || !1,
                    method = options.method || 'blur',
                    before = options.before || function() { return !0 },
                    after = options.after || function() { return !0 },
                    errorCallback = options.errorCallback || function() {},
                    $items = fields(identifie, this);
                patterns = $.extend(patterns, ptns);
                messages = msgs;
                novalidate(this);
                method && validateFields.call(this, $items, method, klass, isErrorOnParent);
                this.on('focusin', identifie, function() {
                    if ('forbiddenWord' == this.getAttribute('data-type')) return;
                    removeErrorClass.call(this, $(this), 'error unvalid empty', isErrorOnParent)
                });
                this.on('submit', function(e) {
                    var appNameInput = $(this).find('[name=app_name]');
                    if (1 == appNameInput.length && appNameInput.parent().hasClass('error')) { appNameInput[0].scrollIntoView(); return !1 }
                    before.call(this, $items);
                    validateForm.call(this, $items, method, klass, isErrorOnParent);
                    return unvalidFields.length ? (e.preventDefault(), errorCallback.call(this, unvalidFields)) : after.call(this, e, $items)
                })
            }
        }(window.jQuery || window.Zepto)
    }, {}]
}, {}, [1]);
! function() {
    function r(e, n, t) {
        function o(i, f) {
            if (!n[i]) {
                if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a }
                var p = n[i] = { exports: {} };
                e[i][0].call(p.exports, function(r) { var n; return o(e[i][1][r] || r) }, p, p.exports, r, e, n, t)
            }
            return n[i].exports
        }
        for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) o(t[i]);
        return o
    }
    return r
}()({
    1: [function(require, module, exports) {
        ! function(root, factory) {
            if ('function' === typeof define && define.amd) define([], factory);
            else if ('object' === typeof exports) module.exports = factory();
            else root.List = factory()
        }(this, function() {
            var List = function(container, data, config, callbacks) {
                this.$container = container instanceof $ ? container : $(container);
                this.data = [];
                if (data) this.data = $.extend(!0, this.data, data);
                this.config = { type: 'list', tableHeader: [], item: config.item || window.Item };
                if (config) this.config = $.extend(!0, this.config, config);
                this.callbacks = {};
                if (callbacks) this.callbacks = $.extend(!0, this.callbacks, callbacks);
                this.loading = !1;
                this.Init()
            };
            List.prototype = {
                Init: function() {
                    var self = this;
                    this.HTML = 'table' == this.config.type ? '<table class="' + (this.config.table_class || 'table') + '"><colgroup>' + this._initTableCol() + '</colgroup><thead><tr>' + this._initTableHeader() + '</tr></thead><tbody><tr><td class="loading" colspan="' + this.config.tableHeader.length + '">数据加载中</td></tr></tbody></table>' : '<ul class="list-group"><li class="no-data loading">数据加载中</li></ul>';
                    this.$el = $(this.HTML).appendTo(this.$container);
                    this.$itemWrap = 'table' == this.config.type ? this.$el.find('tbody') : this.$el;
                    this.$loading = this.$el.find('.loading');
                    this.listObj = [];
                    if (this.data.length > 0) this._bindData(this.data)
                },
                _initTableCol: function() {
                    var str = '';
                    if (this.config.tableHeader.length > 0)
                        for (var k = this.config.tableHeader.length, i = 0; i < k; i++) str = str + '<col width="' + (this.config.tableHeader[i]['width'] || '') + '">';
                    return str
                },
                _initTableHeader: function() {
                    var str = '';
                    if (this.config.tableHeader.length > 0)
                        for (var k = this.config.tableHeader.length, i = 0; i < k; i++) str = str + '<th>' + (this.config.tableHeader[i]['txt'] || '') + '</th>';
                    return str
                },
                _bindData: function(data) {
                    if (1 == this.loading) return !1;
                    if (data.length > 0) {
                        for (var k = Math.min(this.config.size, data.length), i = 0; i < k; i++)
                            if (this.listObj[i]) this.listObj[i].UpdateData(data[i]);
                            else if (this.config.item) this.listObj[i] = new this.config.item(this.$itemWrap, data[i], this.config, this.callbacks)
                    } else this.$itemWrap.html('table' == this.config.type ? '<tr><td class="loading" colspan="' + this.config.tableHeader.length + '">暂无数据</td></tr>' : '<li class="no-data">暂无数据</li>')
                },
                _clear: function(callback) {
                    for (var o in this.listObj) {
                        this.listObj[o].Clear();
                        delete this.listObj[o]
                    }
                    this.listObj = [];
                    this.$itemWrap.empty();
                    if ('function' == typeof callback) callback()
                },
                UpdateData: function(data, needUpdate) {
                    this.loading = !1;
                    this.$loading.hide();
                    if (data) {
                        var needClear = this.data.length !== data.length || needUpdate;
                        this.data = data;
                        this._clear();
                        this._bindData(this.data)
                    }
                },
                SetContent: function(str) {
                    this.loading = !0;
                    this.$loading.show()
                }
            };
            return List
        })
    }, {}],
    2: [function(require, module, exports) {
        ! function(root, factory) {
            if ('function' === typeof define && define.amd) define([], factory);
            else if ('object' === typeof exports) module.exports = factory();
            else root.TableItem = factory()
        }(this, function() {
            var TableItem = function(container, data, config, callbacks) {
                this.$container = container instanceof $ ? container : $(container);
                this.data = [];
                if (data) this.data = data;
                this.config = {};
                if (config) this.config = $.extend(!0, this.config, config);
                this.callbacks = {};
                if (callbacks) this.callbacks = $.extend(!0, this.callbacks, callbacks);
                this.obj = {};
                if (this.data) this.Init()
            };

            function arrayToHTML(arr) {
                for (var str = [], i = 0, len = arr.length; i < len; i++) {
                    var item = arr[i];
                    if ('object' == typeof item && item.txt) str.push('<td><a href="javascript:void(0);" class="operation" data-id="' + (item.id || 0) + '">' + item.txt + '</a></td>');
                    else str.push('<td>' + item + '</td>')
                }
                return str.join('')
            }
            TableItem.prototype = {
                Init: function() {
                    var self = this,
                        tgt = null,
                        data = this.data,
                        HTML = '<tr>' + this._createTd() + '</tr>';
                    this.obj.$el = $(HTML).appendTo(this.$container);
                    this.obj.$el.bind('click', function(e) {
                        var tgt = $(e.target);
                        if (tgt.hasClass('operation'))
                            if ('function' == typeof self.callbacks.onClick) self.callbacks.onClick(tgt.data())
                    })
                },
                _createTd: function() {
                    var str = '',
                        data;
                    return arrayToHTML(this.data)
                },
                _clear: function() {
                    this.obj.$el.remove();
                    for (var o in this.obj)
                        if ('Clear' !== o) {
                            this.obj[o] = null;
                            delete this.obj[o]
                        }
                },
                UpdateData: function(data) {
                    this.data = $.extend(!0, this.data, data);
                    this.obj.$el.empty();
                    this.obj.$el.html(arrayToHTML(data))
                },
                Clear: function() { this._clear() }
            };
            return TableItem
        })
    }, {}],
    3: [function(require, module, exports) {
        var Pagination = require('../../../vendor/scripts/jquery.simplePagination'),
            Item = require('../../../components/table_item/scripts/table_item'),
            List = require('../../../components/list/scripts/list');
        ! function(root, factory) {
            if ('function' === typeof define && define.amd) define([], factory);
            else if ('object' === typeof exports) module.exports = factory();
            else root.returnExports = factory()
        }(this, function() {
            var listObj = null,
                getStatus = function(status, deal) {
                    if (0 == status) return '待分派';
                    else if (1 == status) return '待处理';
                    else if (2 == status) return '待确认';
                    else if (3 == status) return '待回复';
                    else if (4 == status || 5 == status) return '已完成';
                    else return '-'
                },
                getQueryString = function(name) {
                    var queryStr, paramsStr = (window.location.hash || window.location.search).substring(1);
                    if (paramsStr = paramsStr.replace(/\?/g, '&')) {
                        var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'),
                            r = paramsStr.match(reg);
                        if (null !== r) return decodeURI(r[2]);
                        return null
                    }
                    return null
                },
                createPagination = function(items, state) {
                    $('.pagination-wrap').pagination({
                        items: items,
                        itemsOnPage: 10,
                        hrefTextPrefix: '#/order/list/index|',
                        onPageClick: function(n, e) {
                            var page = n;
                            e.preventDefault();
                            createGameServiceList(page, state)
                        }
                    })
                },
                createGameServiceList = function(page, state, id, test, start_time, end_time) {
                    var self = this;
                    if (null == listObj) listObj = new List($('.list-wrap2'), [], { item: Item, size: 10, tableHeader: [{ txt: '工单编号', width: '20%' }, { txt: '问题内容', width: '20%' }, { txt: '问题分类', width: '20%' }, { txt: '状态', width: '15%' }, { txt: '提交时间', width: '15%' }, { txt: '操作', width: '10%' }], type: 'table' }, {
                        onClick: function(data) {
                            var host = window.location.href.split('#')[0];
                            window.open(host + '#/order/detail/index?ticket_id=' + data.ticket_id)
                        }
                    });
                    $.ajax({
                        type: "POST",
                        url: '/order/list/index.json',
                        data: { status: state, number: id, title: test, start_time: start_time, end_time: end_time, limit: 10, offset: 10 * Number(page - 1) },
                        success: function(res) {
                            if (0 === res.errno) {
                                if (0 != res.data.length) {
                                    for (var listData = res.data.rows, arr = [], totalPage = Number(res.data.total), i = 0; i < listData.length; i++) {
                                        var json = listData[i];
                                        arr.push([json.ticket_number, '<span>' + ("" != json.ticket_title ? json.ticket_title : "/") + '</span>', '<span>' + ("" != json.model_name ? json.model_name : "/") + '</span>', getStatus(json.ticket_status, json.ticket_open_status), '<span>' + ("" != json.ticket_submit_time ? json.ticket_submit_time : "/") + '</span>', '<a class="operation" href="javascript:void(0)" data-ticket_id="' + json.ticket_id + '">查看</a>' + (2 == json.ticket_status ? '<span class="span-test">1</span>' : "")])
                                    }
                                    if (listObj) listObj.UpdateData(arr);
                                    if (totalPage > 10) {
                                        if (1 == page) createPagination(totalPage, state);
                                        $('.pagination-wrap').show()
                                    } else $('.pagination-wrap').hide()
                                } else if (listObj) listObj.UpdateData([])
                            } else if (listObj) listObj.UpdateData([])
                        }
                    })
                },
                getDateStr = function(AddDayCount) {
                    var nowDate = new Date;
                    nowDate.setDate(nowDate.getDate() + AddDayCount);
                    var month = nowDate.getMonth() + 1;
                    return nowDate.getFullYear() + "-" + month + "-" + nowDate.getDate()
                };
            $('#datetimepicker1').datetimepicker({ format: 'yyyy-mm-dd hh:ii:00', language: 'cn', minuteStep: 1, autoclose: !0 });
            $('#datetimepicker2').datetimepicker({ format: 'yyyy-mm-dd hh:ii:00', language: 'cn', minuteStep: 1, autoclose: !0 });
            $('.seek').bind('click', function() {
                var id = $('[name="id"]').val(),
                    test = $('[name="test"]').val(),
                    state = $('[name="state"]').val(),
                    start_time = $('[name="start_time"]').val(),
                    end_time = $('[name="end_time"]').val();
                createGameServiceList(1, state, id, test, start_time, end_time)
            });
            createGameServiceList(1, "", "", "")
        })
    }, { "../../../components/list/scripts/list": 1, "../../../components/table_item/scripts/table_item": 2, "../../../vendor/scripts/jquery.simplePagination": 4 }],
    4: [function(require, module, exports) {
        $ = jQuery, methods = {
            init: function(options) {
                var o = $.extend({ items: 1, itemsOnPage: 1, pages: 0, displayedPages: 5, edges: 2, currentPage: 0, useAnchors: !0, hrefTextPrefix: '#page-', hrefTextSuffix: '', prevText: 'Prev', nextText: 'Next', ellipseText: '&hellip;', ellipsePageSet: !0, cssStyle: 'light-theme', listStyle: '', labelMap: [], selectOnClick: !0, nextAtFront: !1, invertPageOrder: !1, useStartEdge: !0, useEndEdge: !0, onPageClick: function(pageNumber, event) {}, onInit: function() {} }, options || {}),
                    self = this;
                o.pages = o.pages ? o.pages : Math.ceil(o.items / o.itemsOnPage) ? Math.ceil(o.items / o.itemsOnPage) : 1;
                if (o.currentPage) o.currentPage = o.currentPage - 1;
                else o.currentPage = !o.invertPageOrder ? 0 : o.pages - 1;
                o.halfDisplayed = o.displayedPages / 2;
                this.each(function() {
                    self.addClass(o.cssStyle + ' simple-pagination').data('pagination', o);
                    methods._draw.call(self)
                });
                o.onInit();
                return this
            },
            selectPage: function(page) { methods._selectPage.call(this, page - 1); return this },
            prevPage: function() { var o = this.data('pagination'); if (!o.invertPageOrder) { if (o.currentPage > 0) methods._selectPage.call(this, o.currentPage - 1) } else if (o.currentPage < o.pages - 1) methods._selectPage.call(this, o.currentPage + 1); return this },
            nextPage: function() { var o = this.data('pagination'); if (!o.invertPageOrder) { if (o.currentPage < o.pages - 1) methods._selectPage.call(this, o.currentPage + 1) } else if (o.currentPage > 0) methods._selectPage.call(this, o.currentPage - 1); return this },
            getPagesCount: function() { return this.data('pagination').pages },
            setPagesCount: function(count) { this.data('pagination').pages = count },
            getCurrentPage: function() { return this.data('pagination').currentPage + 1 },
            destroy: function() { this.empty(); return this },
            drawPage: function(page) {
                var o = this.data('pagination');
                o.currentPage = page - 1;
                this.data('pagination', o);
                methods._draw.call(this);
                return this
            },
            redraw: function() { methods._draw.call(this); return this },
            disable: function() {
                var o = this.data('pagination');
                o.disabled = !0;
                this.data('pagination', o);
                methods._draw.call(this);
                return this
            },
            enable: function() {
                var o = this.data('pagination');
                o.disabled = !1;
                this.data('pagination', o);
                methods._draw.call(this);
                return this
            },
            updateItems: function(newItems) {
                var o = this.data('pagination');
                o.items = newItems;
                o.pages = methods._getPages(o);
                this.data('pagination', o);
                methods._draw.call(this)
            },
            updateItemsOnPage: function(itemsOnPage) {
                var o = this.data('pagination');
                o.itemsOnPage = itemsOnPage;
                o.pages = methods._getPages(o);
                this.data('pagination', o);
                methods._selectPage.call(this, 0);
                return this
            },
            getItemsOnPage: function() { return this.data('pagination').itemsOnPage },
            _draw: function() {
                var o = this.data('pagination'),
                    interval = methods._getInterval(o),
                    i, tagName;
                methods.destroy.call(this);
                var $panel = 'UL' === (tagName = 'function' === typeof this.prop ? this.prop('tagName') : this.attr('tagName')) ? this : $('<ul' + (o.listStyle ? ' class="' + o.listStyle + '"' : '') + '></ul>').appendTo(this);
                if (o.prevText) methods._appendItem.call(this, !o.invertPageOrder ? o.currentPage - 1 : o.currentPage + 1, { text: o.prevText, classes: 'prev' });
                if (o.nextText && o.nextAtFront) methods._appendItem.call(this, !o.invertPageOrder ? o.currentPage + 1 : o.currentPage - 1, { text: o.nextText, classes: 'next' });
                if (!o.invertPageOrder) {
                    if (interval.start > 0 && o.edges > 0) {
                        if (o.useStartEdge) { var end = Math.min(o.edges, interval.start); for (i = 0; i < end; i++) methods._appendItem.call(this, i) }
                        if (o.edges < interval.start && interval.start - o.edges != 1) $panel.append('<li class="disabled"><span class="ellipse">' + o.ellipseText + '</span></li>');
                        else if (interval.start - o.edges == 1) methods._appendItem.call(this, o.edges)
                    }
                } else if (interval.end < o.pages && o.edges > 0) {
                    if (o.useStartEdge) { var begin = Math.max(o.pages - o.edges, interval.end); for (i = o.pages - 1; i >= begin; i--) methods._appendItem.call(this, i) }
                    if (o.pages - o.edges > interval.end && o.pages - o.edges - interval.end != 1) $panel.append('<li class="disabled"><span class="ellipse">' + o.ellipseText + '</span></li>');
                    else if (o.pages - o.edges - interval.end == 1) methods._appendItem.call(this, interval.end)
                }
                if (!o.invertPageOrder)
                    for (i = interval.start; i < interval.end; i++) methods._appendItem.call(this, i);
                else
                    for (i = interval.end - 1; i >= interval.start; i--) methods._appendItem.call(this, i);
                if (!o.invertPageOrder) {
                    if (interval.end < o.pages && o.edges > 0) {
                        if (o.pages - o.edges > interval.end && o.pages - o.edges - interval.end != 1) $panel.append('<li class="disabled"><span class="ellipse">' + o.ellipseText + '</span></li>');
                        else if (o.pages - o.edges - interval.end == 1) methods._appendItem.call(this, interval.end);
                        if (o.useEndEdge) { var begin; for (i = begin = Math.max(o.pages - o.edges, interval.end); i < o.pages; i++) methods._appendItem.call(this, i) }
                    }
                } else if (interval.start > 0 && o.edges > 0) {
                    if (o.edges < interval.start && interval.start - o.edges != 1) $panel.append('<li class="disabled"><span class="ellipse">' + o.ellipseText + '</span></li>');
                    else if (interval.start - o.edges == 1) methods._appendItem.call(this, o.edges);
                    if (o.useEndEdge) { var end; for (i = (end = Math.min(o.edges, interval.start)) - 1; i >= 0; i--) methods._appendItem.call(this, i) }
                }
                if (o.nextText && !o.nextAtFront) methods._appendItem.call(this, !o.invertPageOrder ? o.currentPage + 1 : o.currentPage - 1, { text: o.nextText, classes: 'next' });
                if (o.ellipsePageSet && !o.disabled) methods._ellipseClick.call(this, $panel)
            },
            _getPages: function(o) { var pages; return Math.ceil(o.items / o.itemsOnPage) || 1 },
            _getInterval: function(o) { return { start: Math.ceil(o.currentPage > o.halfDisplayed ? Math.max(Math.min(o.currentPage - o.halfDisplayed, o.pages - o.displayedPages), 0) : 0), end: Math.ceil(o.currentPage > o.halfDisplayed ? Math.min(o.currentPage + o.halfDisplayed, o.pages) : Math.min(o.displayedPages, o.pages)) } },
            _appendItem: function(pageIndex, opts) {
                var self = this,
                    options, $link, o = self.data('pagination'),
                    $linkWrapper = $('<li></li>'),
                    $ul = self.find('ul');
                options = { text: (pageIndex = pageIndex < 0 ? 0 : pageIndex < o.pages ? pageIndex : o.pages - 1) + 1, classes: '' };
                if (o.labelMap.length && o.labelMap[pageIndex]) options.text = o.labelMap[pageIndex];
                options = $.extend(options, opts || {});
                if (pageIndex == o.currentPage || o.disabled) {
                    if (o.disabled || 'prev' === options.classes || 'next' === options.classes) $linkWrapper.addClass('disabled');
                    else $linkWrapper.addClass('active');
                    $link = $('<span class="current">' + options.text + '</span>')
                } else {
                    if (o.useAnchors) $link = $('<a href="' + o.hrefTextPrefix + (pageIndex + 1) + o.hrefTextSuffix + '" class="page-link">' + options.text + '</a>');
                    else $link = $('<span >' + options.text + '</span>');
                    $link.click(function(event) { return methods._selectPage.call(self, pageIndex, event) })
                }
                if (options.classes) $link.addClass(options.classes);
                $linkWrapper.append($link);
                if ($ul.length) $ul.append($linkWrapper);
                else self.append($linkWrapper)
            },
            _selectPage: function(pageIndex, event) {
                var o = this.data('pagination');
                o.currentPage = pageIndex;
                if (o.selectOnClick) methods._draw.call(this);
                return o.onPageClick(pageIndex + 1, event)
            },
            _ellipseClick: function($panel) {
                var self = this,
                    o = this.data('pagination'),
                    $ellip = $panel.find('.ellipse');
                $ellip.addClass('clickable').parent().removeClass('disabled');
                $ellip.click(function(event) {
                    if (!o.disable) {
                        var $this = $(this),
                            val = (parseInt($this.parent().prev().text(), 10) || 0) + 1;
                        $this.html('<input type="number" min="1" max="' + o.pages + '" step="1" value="' + val + '">').find('input').focus().click(function(event) { event.stopPropagation() }).keyup(function(event) { var val = $(this).val(); if (13 === event.which && '' !== val) { if (val > 0 && val <= o.pages) methods._selectPage.call(self, val - 1) } else if (27 === event.which) $ellip.empty().html(o.ellipseText) }).bind('blur', function(event) {
                            var val = $(this).val();
                            if ('' !== val) methods._selectPage.call(self, val - 1);
                            $ellip.empty().html(o.ellipseText);
                            return !1
                        })
                    }
                    return !1
                })
            }
        }, void($.fn.pagination = function(method) {
            if (methods[method] && '_' != method.charAt(0)) return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
            else if ('object' === typeof method || !method) return methods.init.apply(this, arguments);
            else $.error('Method ' + method + ' does not exist on jQuery.pagination')
        });
        var $, methods
    }, {}]
}, {}, [3]);